Skip to content

fix(windows): preserve promisified child-process results - #710

Open
po-et wants to merge 1 commit into
dataelement:mainfrom
po-et:fix/windows-child-process-promisify
Open

po-et wants to merge 1 commit into
dataelement:mainfrom
po-et:fix/windows-child-process-promisify

Conversation

@po-et

@po-et po-et commented Oct 15, 2026

Copy link
Copy Markdown

Fixes #695.

The Windows wrappers replace exec and execFile without their custom promisify hooks. Promise consumers consequently receive a stdout string instead of { stdout, stderr }. exec also re-enters execFile with an options-object overload that the wrapper mishandled.

Delegate to Node's native hooks after applying windowsHide, rather than copying the hooks unchanged and bypassing the no-console policy. This preserves Promise.child, buffered output, failure diagnostics, and an explicit windowsHide: false.

Verified on macOS:

  • vitest run: 181 files, 1,639 tests passed.
  • Targeted regressions: 27 passed on Node 24/26 and Electron's Node runtime; all three new cases fail against the old implementation.
  • Type checking, build and git diff --check passed.

Native Windows application verification remains outstanding. Tests used an independent copy of the existing locked dependencies; a fresh npm ci in the isolated checkout did not complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant