fix(child_process): add execArgv support to spawn() - #65741
Conversation
The execArgv option passed to spawn() was being silently ignored. This commit adds proper handling of execArgv in normalizeSpawnArguments(), prepending the execArgv values to the args array before argv0/file. Fixes: nodejs#65725 PR-URL: nodejs#65726
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65741 +/- ##
==========================================
+ Coverage 89.96% 89.98% +0.02%
==========================================
Files 757 757
Lines 257376 257384 +8
Branches 48794 48794
==========================================
+ Hits 231550 231619 +69
+ Misses 16911 16846 -65
- Partials 8915 8919 +4
🚀 New features to boost your workflow:
|
Renegade334
left a comment
There was a problem hiding this comment.
This would imply that spawn() is just for creating Node.js processes. It's not, it's for arbitrary child processes, and Node.js CLI arguments should be passed positionally.
|
Caution AgentScan found account activity patterns that may be consistent with |
Fix issue #65725 where spawn() silently ignores the execArgv option.
spawn() now correctly handles execArgv by prepending it to the args array, matching fork() behavior.