-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make cmd optional #32
Comments
So basically, using cmd.exe makes the spawn a lot slower if I understood correctly. The detection to whether use cmd or not must be clever. There's tooling such as If it doesn't cause any harm, I'm willing to say it's a good idea. |
Alternatively, perhaps we should maintain a list of commands included in the output of Another question is, should |
Removing the support for it would be a breaking change. |
That's what semver is for. ;-) |
I know but keeping it won't interfere with the solution we are agreeing with. When attempting to resolve |
I agree. Just wanted to point out that breaking changes wouldn't necessarily be an issue, and that conceptually, At any rate, I'll see if I can come up with a PR that adds the extension check. I'll probably also add an option to bypass it, so people have an override for executables that do need to run in a shell for whatever reason. |
sgtm |
child_process.spawn
recently got ashell
option that spawnscmd.exe
for you on Windows, pretty much the waycross-spawn
does. However, as discussed in nodejs/node#6671 and nodejs/node#6784, it signifcantly impacts performance.To avoid unnecessarily slowing down the spawn call, I suggested looking at the file extension to determine if a shell is actually required. The PR got rejected, which I understand (see link above), but I think it makes sense to include the same logic in
cross-spawn
.Before I actually create a PR, I'd like to test the water first. Do you think it's a good idea?
The text was updated successfully, but these errors were encountered: