mirror of
https://github.com/89luca89/distrobox.git
synced 2025-02-25 18:55:25 -06:00
enter: fix shell when entering initful container after Fix #1275
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
@@ -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}"\"
|
||||
|
||||
Reference in New Issue
Block a user