Skip to content

fix: use cross-spawn for Windows native runtime commands#137

Merged
Zhang-Henry merged 1 commit intoOpenLAIR:mainfrom
r1ng13:fix/windows-spawn-einval
Apr 9, 2026
Merged

fix: use cross-spawn for Windows native runtime commands#137
Zhang-Henry merged 1 commit intoOpenLAIR:mainfrom
r1ng13:fix/windows-spawn-einval

Conversation

@r1ng13
Copy link
Copy Markdown
Contributor

@r1ng13 r1ng13 commented Apr 7, 2026

Summary

Fix Windows spawn EINVAL errors when preparing native runtime commands in development workflows.

Cause

On Windows, launching .cmd wrappers such as npm.cmd and npx.cmd through child_process.spawn(..., { shell: false }) can fail with spawn EINVAL.

Changes

  • use cross-spawn in scripts/native-runtime.mjs
  • use cross-spawn in electron/cli.mjs

Verification

  • reproduced the failure on Windows with node scripts/native-runtime.mjs node
  • verified the command succeeds after this change
  • confirmed the native module rebuild step completes normally

Notes

This is a small Windows compatibility fix and does not change behavior on non-Windows platforms.

@Zhang-Henry Zhang-Henry merged commit 6ccc83b into OpenLAIR:main Apr 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants