From cfa7592c5043896da10dd8f34a9545b0f3720c3e Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Wed, 22 Sep 2021 16:13:05 -0500 Subject: [PATCH] Allow workdir to be set properly when entrypoint is not invoked. --- utilities/entrypoint.sh | 1 - utilities/shell_intercept.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/utilities/entrypoint.sh b/utilities/entrypoint.sh index 32232a5..d111de5 100755 --- a/utilities/entrypoint.sh +++ b/utilities/entrypoint.sh @@ -17,5 +17,4 @@ if ! [ $(id -u) = 0 ]; then fi fi # Run command -pwd | grep -qvE "^\/home\/\.?anaconda$" || cd ~ "$@" \ No newline at end of file diff --git a/utilities/shell_intercept.sh b/utilities/shell_intercept.sh index a3891b8..fd62463 100755 --- a/utilities/shell_intercept.sh +++ b/utilities/shell_intercept.sh @@ -23,6 +23,6 @@ if ! [ $(id -u) = 0 ]; then cd /tmp /startup -user=$ORIG_USER -new_uid=$(id -u) -new_gid=$(id -g) -new_user=${NEW_USER} -new_home=$NEW_HOME export HOME=/home/${NEW_USER} - cd $CURR_DIR 2>/dev/null || cd $HOME + echo $CURR_DIR | grep -qvE "^\/home\/\.?anaconda$" && cd $CURR_DIR || cd ~ fi export PATH=$(readlink -f "$HOME")/.local/bin:$PATH \ No newline at end of file