Snap: keep LD_LIBRARY_PATH when in snap environment (#3618)

This commit is contained in:
hideo aoyama 2024-12-06 22:42:03 +09:00 committed by GitHub
parent a4626bf48e
commit 039c7fc0a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -198,6 +198,7 @@ Cy Pokhrel <cy@cy7.sh>
Park Hyunwoo <phu54321@naver.com>
Tomas Fabrizio Orsi <torsi@fi.uba.ar>
Sawan Sunar <sawansunar24072002@gmail.com>
hideo aoyama <https://github.com/boukendesho>
********************

View file

@ -245,7 +245,8 @@ av_player = AVPlayer()
def _packagedCmd(cmd: list[str]) -> tuple[Any, dict[str, str]]:
cmd = cmd[:]
env = os.environ.copy()
if "LD_LIBRARY_PATH" in env:
# keep LD_LIBRARY_PATH when in snap environment
if "LD_LIBRARY_PATH" in env and "SNAP" not in env:
del env["LD_LIBRARY_PATH"]
if is_win: