fix(windows): hide pdftoppm console flash on PDF attach

server.py's PDF-attach handler shells out to `pdftoppm` from the
console-less desktop/gateway backend; on Windows that pops a conhost
window each attach. Route it through windows_hide_flags() like the
sibling _list_repo_files git calls (no-op on POSIX).
This commit is contained in:
Brooklyn Nicholson 2026-06-28 17:43:27 -05:00
parent 32087e4bc9
commit ee22d853eb

View file

@ -9126,8 +9126,13 @@ def _(rid, params: dict) -> dict:
"-f", str(first_page), "-l", str(last_page),
str(pdf_path), str(out_prefix),
]
from hermes_cli._subprocess_compat import windows_hide_flags
try:
res = subprocess.run(argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
res = subprocess.run(
argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL,
creationflags=windows_hide_flags(),
)
except subprocess.TimeoutExpired:
return _err(rid, 5028, "pdftoppm timed out (>120s)")
if res.returncode != 0: