Repository navigation
Conversation
Node's bundled npm.cmd and npx.cmd keep a batch file running under npm, so Ctrl+C left cf waiting at cmd's "Terminate batch job (Y/N)?" prompt. Run npm's CLI script with Node directly instead. Fixes cloudflare#412
Contributor
|
Hi @Cherry. Thanks for contributing to During the open beta, we’re being very intentional about the changes we accept so that we can prioritise stability for GA. We’re limiting pull requests to contributions coordinated with the team in advance, so this PR has been automatically closed. We’d still love to hear about your use case, so please make sure it’s captured in a |
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.
Fixes #412
On Windows,
cf dev,cf buildandcf initrunnpm/npxthrough thenpm.cmd/npx.cmdbundled with Node. Those keep a batch file running under npm, so after Ctrl+C cmd sits atTerminate batch job (Y/N)?and cf never exits.runProjectCommandnow resolvesnpm/npxto the CLI script the launcher would run and starts it with Node directly. It follows the launcher's own lookup: thenode.exenext to it, and an npm upgraded into the global prefix vianpm-prefix.js. Anything it doesn't recognise runs as before.pnpm projects still prompt from pnpm's own
node_modules\.binshims, which is outside cf.npxcases to the Windows console Ctrl+C test, using a verbatim copy of npm'snpx.cmd. They hang without this change.