mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-11 04:00:38 +00:00
fix: wait for the Python console runtime on Windows
This commit is contained in:
@@ -24,6 +24,7 @@ from __future__ import annotations
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
@@ -156,7 +157,7 @@ def _node_launch_args() -> tuple[str, str]:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Execute the bundled dsh CLI with an explicitly selected Harness home."""
|
||||
"""Launch the CLI with explicit DSH_HOME; wait on Windows, replace the process on POSIX."""
|
||||
if not os.environ.get("DSH_HOME", "").strip():
|
||||
print(
|
||||
"dsh: the Python runtime command requires an explicit DSH_HOME; "
|
||||
@@ -165,6 +166,9 @@ def main() -> None:
|
||||
)
|
||||
raise SystemExit(2)
|
||||
argv = (*resolve_bundled_launch_args(), *sys.argv[1:])
|
||||
if sys.platform == "win32":
|
||||
# Windows CRT exec does not replace the process; wait and preserve the runtime status.
|
||||
raise SystemExit(subprocess.run(argv, env=os.environ).returncode)
|
||||
os.execvpe(argv[0], argv, os.environ)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user