Skip to content

Commit

Permalink
enter: fix shell when entering initful container after Fix #1275
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
  • Loading branch information
89luca89 committed Mar 11, 2024
1 parent a3865e2 commit 9d0cd87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion distrobox-enter
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"\"
Expand Down

0 comments on commit 9d0cd87

Please # to comment.