Skip to content

Commit cc47dbd

Browse files
authored
Preserve LD_LIBRARY_PATH in start.sh (#1981)
1 parent 7a4381f commit cc47dbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

images/docker-stacks-foundation/start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ if [ "$(id -u)" == 0 ] ; then
140140
unset_explicit_env_vars
141141
_log "Running as ${NB_USER}:" "${cmd[@]}"
142142
exec sudo --preserve-env --set-home --user "${NB_USER}" \
143+
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \
143144
PATH="${PATH}" \
144145
PYTHONPATH="${PYTHONPATH:-}" \
145146
"${cmd[@]}"
@@ -165,7 +166,7 @@ if [ "$(id -u)" == 0 ] ; then
165166
# used `env_delete` from /etc/sudoers. It has higher priority than the
166167
# `--preserve-env` flag and the `env_keep` configuration.
167168
#
168-
# - We preserve PATH and PYTHONPATH explicitly. Note however that sudo
169+
# - We preserve LD_LIBRARY_PATH, PATH and PYTHONPATH explicitly. Note however that sudo
169170
# resolves `${cmd[@]}` using the "secure_path" variable we modified
170171
# above in /etc/sudoers.d/path. Thus PATH is irrelevant to how the above
171172
# sudo command resolves the path of `${cmd[@]}`. The PATH will be relevant

0 commit comments

Comments
 (0)