diff --git a/images/docker-stacks-foundation/start.sh b/images/docker-stacks-foundation/start.sh index b7f61ce505..ac4f02da6f 100755 --- a/images/docker-stacks-foundation/start.sh +++ b/images/docker-stacks-foundation/start.sh @@ -136,8 +136,8 @@ if [ "$(id -u)" == 0 ] ; then # NOTE: This hook is run as the root user! # shellcheck disable=SC1091 source /usr/local/bin/run-hooks.sh /usr/local/bin/before-notebook.d - unset_explicit_env_vars + _log "Running as ${NB_USER}:" "${cmd[@]}" exec sudo --preserve-env --set-home --user "${NB_USER}" \ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \ @@ -234,6 +234,7 @@ else # shellcheck disable=SC1091 source /usr/local/bin/run-hooks.sh /usr/local/bin/before-notebook.d unset_explicit_env_vars + _log "Executing the command:" "${cmd[@]}" exec "${cmd[@]}" fi diff --git a/tests/docker-stacks-foundation/test_user_options.py b/tests/docker-stacks-foundation/test_user_options.py index cfb344cf2f..8702af504e 100644 --- a/tests/docker-stacks-foundation/test_user_options.py +++ b/tests/docker-stacks-foundation/test_user_options.py @@ -243,7 +243,7 @@ def test_container_not_delete_bind_mount( @pytest.mark.parametrize("enable_root", [False, True]) -def test_jupyter_env_vars_to_unset_as_root( +def test_jupyter_env_vars_to_unset( container: TrackedContainer, enable_root: bool ) -> None: """Environment variables names listed in JUPYTER_ENV_VARS_TO_UNSET