Repository navigation
Run npm's JS entry point under node on Windows - #182
Merged
Merged
Conversation
#179 fixed three of the four Windows failures; test 28 moved from "spawnSync npm ENOENT" to "spawnSync npm.cmd EINVAL". Naming npm.cmd was necessary but not sufficient: since the CVE-2024-27980 fix, Node refuses to spawn a .cmd or .bat without shell: true and throws EINVAL rather than running it. `shell: true` would work but means quoting every argument for cmd.exe. Instead this runs npm's own npm-cli.js under the current Node, which is exactly what scripts/pack-sources.mjs already does for the same reason. The non-Windows path is unchanged and still spawns `npm` directly. I should have reached for the existing idiom the first time: pack-sources.mjs had already solved this, and matching it immediately would have saved a round trip through main. Co-Authored-By: Claude Opus 5 <[email protected]>
They were uncommitted when I switched branches and got swept into this one by git add -A. They describe the auth and admin package moves and belong with their release, not with a Windows spawn fix. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #179, which fixed three of the four Windows failures. The fourth
moved from
spawnSync npm ENOENTtospawnSync npm.cmd EINVAL.Naming
npm.cmdwas necessary but not sufficient: since the CVE-2024-27980fix, Node refuses to spawn a
.cmd/.batwithoutshell: trueand throwsEINVALrather than running it.shell: truewould work but means quoting arguments forcmd.exe. This runsnpm's own
npm-cli.jsunder the current Node instead — the idiomscripts/pack-sources.mjsalready uses for exactly this reason. Thenon-Windows path is unchanged.
As with #179, this PR's checks are Linux-only by design and cannot confirm the
fix; the push-to-
mainmatrix run is what proves it.🤖 Generated with Claude Code