Skip to content

Commit

Permalink
Preserve LD_LIBRARY_PATH in start.sh (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Aug 25, 2023
1 parent 7a4381f commit cc47dbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion images/docker-stacks-foundation/start.sh
Expand Up @@ -140,6 +140,7 @@ if [ "$(id -u)" == 0 ] ; then
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}" \
PATH="${PATH}" \
PYTHONPATH="${PYTHONPATH:-}" \
"${cmd[@]}"
Expand All @@ -165,7 +166,7 @@ if [ "$(id -u)" == 0 ] ; then
# used `env_delete` from /etc/sudoers. It has higher priority than the
# `--preserve-env` flag and the `env_keep` configuration.
#
# - We preserve PATH and PYTHONPATH explicitly. Note however that sudo
# - We preserve LD_LIBRARY_PATH, PATH and PYTHONPATH explicitly. Note however that sudo
# resolves `${cmd[@]}` using the "secure_path" variable we modified
# above in /etc/sudoers.d/path. Thus PATH is irrelevant to how the above
# sudo command resolves the path of `${cmd[@]}`. The PATH will be relevant
Expand Down

0 comments on commit cc47dbd

Please sign in to comment.