diff --git a/distrobox-enter b/distrobox-enter index 84dbb7741c..777001dce0 100755 --- a/distrobox-enter +++ b/distrobox-enter @@ -77,7 +77,7 @@ headless=0 [ "$(id -ru)" -eq 0 ] && rootful=1 || rootful=0 skip_workdir=0 verbose=0 -version="1.7.0" +version="1.7.0.1" # Source configuration files, this is done in an hierarchy so local files have # priority over system defaults @@ -333,6 +333,10 @@ generate_command() { container_command_login="${container_command_login} --pty" fi container_command_login="${container_command_login} -c \"\\\$(getent passwd ${USER} | cut -f 7 -d :) -l\"" + if [ -n "${container_command}" ]; then + container_command="$(echo "${container_command}" | sed 's/\$/\\\$/g')" + container_command="${container_command_login} -c \"${container_command}\"" + fi else result_command="${result_command} --user=\"${USER}"\"