khh
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled

This commit is contained in:
nose
2025-12-24 02:13:21 -08:00
parent 8bf04c6b71
commit 24dd18de7e
20 changed files with 1792 additions and 636 deletions

View File

@@ -102,6 +102,23 @@ def _run_task(args, parser) -> int:
'command': command,
'cwd': args.cwd or os.getcwd(),
})
popen_kwargs = {}
if os.name == 'nt':
# Avoid flashing a console window when spawning console-subsystem executables.
flags = 0
try:
flags |= int(getattr(subprocess, 'CREATE_NO_WINDOW', 0x08000000))
except Exception:
flags |= 0x08000000
popen_kwargs['creationflags'] = flags
try:
si = subprocess.STARTUPINFO()
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
si.wShowWindow = subprocess.SW_HIDE
popen_kwargs['startupinfo'] = si
except Exception:
pass
try:
process = subprocess.Popen(
command,
@@ -112,6 +129,7 @@ def _run_task(args, parser) -> int:
text=True,
bufsize=1,
universal_newlines=True,
**popen_kwargs,
)
except FileNotFoundError as exc:
notifier('downlow-task-event', {