mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-28 01:28:46 -04:00
Merge pull request #5904 from ThomasWaldmann/fix-pyinstaller-dir-mode-1.1
fix pyinstaller detection for dir-mode, fixes #5897
This commit is contained in:
commit
7cfb03a67c
1 changed files with 2 additions and 3 deletions
|
|
@ -2445,10 +2445,9 @@ def prepare_subprocess_env(system, env=None):
|
|||
# in the original env (in this case, the pyinstaller bootloader
|
||||
# does *not* put ..._ORIG into the env either).
|
||||
# in this case, we must kill LDLP.
|
||||
# The directory used by pyinstaller is created by mkdtemp("_MEIXXXXXX"),
|
||||
# we can use that to differentiate between the cases.
|
||||
# We can recognize this via sys.frozen and sys._MEIPASS being set.
|
||||
lp = env.get(lp_key)
|
||||
if lp is not None and re.search(r'/_MEI......', lp):
|
||||
if lp is not None and getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||
env.pop(lp_key)
|
||||
# security: do not give secrets to subprocess
|
||||
env.pop('BORG_PASSPHRASE', None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue