enter: workdir should be set to pwd, default to home if not defined. Fix #25

This commit is contained in:
89luca89
2021-12-10 23:46:29 +01:00
parent 5ce047e291
commit 030d3ba2b2
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ fi
container_image="registry.fedoraproject.org/fedora-toolbox:35"
container_name="fedora-toolbox-35"
container_user_gid="$(id -rg)"
container_user_home="${HOME}"
container_user_home="${HOME:-"/"}"
container_user_name="${USER}"
container_user_uid="$(id -ru)"
distrobox_entrypoint_path="$(command -v distrobox-init)"
+2 -2
View File
@@ -14,7 +14,7 @@ if ! command -v podman >/dev/null; then
fi
# Defaults
container_command="${SHELL} -l"
container_command="${SHELL:-"bash"} -l"
container_name="fedora-toolbox-35"
verbose=0
version="distrobox_version_placeholder"
@@ -125,7 +125,7 @@ podman logs -f ${container_name}"
result_command="${result_command} --log-level debug"
fi
result_command="${result_command} --interactive --tty"
result_command="${result_command} --user=${USER} --workdir=${HOME}"
result_command="${result_command} --user=${USER} --workdir=${PWD:-${HOME:-"/"}}"
result_command="${result_command} --env=DISTROBOX_ENTER_PATH=$(command -v distrobox-enter)"
# exporting current environment to container
for i in $(printenv | grep '=' | grep -v ' '); do