Detach frozen service console environment
This commit is contained in:
@@ -620,6 +620,7 @@ def _restart_backend(
|
||||
cwd=cwd,
|
||||
stdin=subprocess.DEVNULL,
|
||||
shell=False,
|
||||
env=_service_console_environment(),
|
||||
creationflags=_backend_console_creation_flags(),
|
||||
)
|
||||
else:
|
||||
@@ -668,6 +669,13 @@ def _service_console_launcher() -> list[str]:
|
||||
return [sys.executable, str(console_runner)]
|
||||
|
||||
|
||||
def _service_console_environment() -> dict[str, str]:
|
||||
environment = os.environ.copy()
|
||||
if getattr(sys, "frozen", False):
|
||||
environment["PYINSTALLER_RESET_ENVIRONMENT"] = "1"
|
||||
return environment
|
||||
|
||||
|
||||
def _restart_ssm_backend(
|
||||
command: list[str],
|
||||
cwd: Path,
|
||||
|
||||
Reference in New Issue
Block a user