Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

windows: enable process reuse for cmd-shims #43

Closed
zkat opened this issue Jun 21, 2017 · 0 comments
Closed

windows: enable process reuse for cmd-shims #43

zkat opened this issue Jun 21, 2017 · 0 comments

Comments

@zkat
Copy link
Owner

zkat commented Jun 21, 2017

As of npx@6.1.0, if the command you're trying to execute turns out to be a Node.js script, npx will do some trickery to "convert" that script into the main module for its own Node process, without spawning a child. This is a pretty significant optimization for what turns out to be a pretty common case for npx users.

Unfortunately, there's no Windows cmd shim detection right now, so this trick works exclusively on *nix platforms.

So, it'd be nice to safely detect the Windows cmd shims that npm installs into $PATH, and grab the Node.js script it's meant to execute -- and call that directly. This should make Windows execution much faster.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant