Commit 475ab49f authored by Brett Randall's avatar Brett Randall

Made variable reference PYTHONPATH safe in case of set -eu.

Signed-off-by: default avatarBrett Randall <javabrett@gmail.com>
parent 45b8529a
...@@ -102,7 +102,7 @@ if [ $(id -u) == 0 ] ; then ...@@ -102,7 +102,7 @@ if [ $(id -u) == 0 ] ; then
# the environment preserved # the environment preserved
run-hooks /usr/local/bin/before-notebook.d run-hooks /usr/local/bin/before-notebook.d
echo "Executing the command: ${cmd[@]}" echo "Executing the command: ${cmd[@]}"
exec sudo -E -H -u $NB_USER PATH=$PATH XDG_CACHE_HOME=/home/$NB_USER/.cache PYTHONPATH=$PYTHONPATH "${cmd[@]}" exec sudo -E -H -u $NB_USER PATH=$PATH XDG_CACHE_HOME=/home/$NB_USER/.cache PYTHONPATH=${PYTHONPATH:-} "${cmd[@]}"
else else
if [[ "$NB_UID" == "$(id -u jovyan)" && "$NB_GID" == "$(id -g jovyan)" ]]; then if [[ "$NB_UID" == "$(id -u jovyan)" && "$NB_GID" == "$(id -g jovyan)" ]]; then
# User is not attempting to override user/group via environment # User is not attempting to override user/group via environment
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment