From e9f51e330211743f52d20a9a1b570da8db4db6af Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Fri, 23 May 2025 19:26:37 +0000 Subject: [PATCH] Linux: avoid adding cwd to LD_LIBRARY_PATH (#5029) When LD_LIBRARY_PATH is not set, the old code would also add the current working directory to LD_LIBRARY_PATH, which is bad. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a46b1e8c..95974671 100644 --- a/setup.py +++ b/setup.py @@ -481,7 +481,7 @@ tmp="${{exe#*/}}" if [ ! "${{#tmp}}" -lt "${{#exe}}" ]; then exe="{default_exe.parent}/$exe" fi -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APPDIR/{default_exe.parent}/lib" +export LD_LIBRARY_PATH="${{LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}}$APPDIR/{default_exe.parent}/lib" $APPDIR/$exe "$@" """) launcher_filename.chmod(0o755)