Skip to content

Commit

Permalink
Merge pull request #40 from guzman-raphael/fix-home-rename2
Browse files Browse the repository at this point in the history
Allow workdir to be set properly when entrypoint is not invoked
  • Loading branch information
guzman-raphael authored Sep 22, 2021
2 parents 67ffab0 + cfa7592 commit de5aba4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion utilities/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ if ! [ $(id -u) = 0 ]; then
fi
fi
# Run command
pwd | grep -qvE "^\/home\/\.?anaconda$" || cd ~
"$@"
2 changes: 1 addition & 1 deletion utilities/shell_intercept.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit de5aba4

Please sign in to comment.