Merge pull request #11926 from wfjsw/fix-env-get-1

fix 11291#issuecomment-1646547908
This commit is contained in:
AUTOMATIC1111 2023-07-22 16:37:03 +03:00
parent cad87bf4e3
commit 1f59be5188
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ def run_extension_installer(extension_dir):
try:
env = os.environ.copy()
env['PYTHONPATH'] = f"{os.path.abspath('.')}{os.pathsep}{env['PYTHONPATH']}"
env['PYTHONPATH'] = f"{os.path.abspath('.')}{os.pathsep}{env.get('PYTHONPATH', '')}"
print(run(f'"{python}" "{path_installer}"', errdesc=f"Error running install.py for extension {extension_dir}", custom_env=env))
except Exception as e: