-
Notifications
You must be signed in to change notification settings - Fork 463
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
exec doesn't work for executables other than "node" on Windows #1054
Comments
Note that this probably also affects any other commands run via |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using
fnm exec
, onlynode
works;npm
andnpx
don't execute and so I get my global install (or, no install if fnm is my main way of getting Node).Here's a PowerShell script which shows what I'm referring to:
The output is:
I suspect that something in the chain isn't handling Window's
PATHEXT
or something. I'm not super familiar with rust's process handling, but this seems relevant: https://doc.rust-lang.org/std/process/struct.Command.html#platform-specific-behaviorSo, this is roughly rust-lang/rust#37519 and using https://docs.rs/which/latest/which/ on the command before running would probably fix this. That or, always using a shell on Windows. Not sure what Node itself does here. I know Go handles this for you (https://cs.opensource.google/go/go/+/master:src/os/exec/lp_windows.go), but Rust seems to not want to do this and remain a syscall wrapper.
The text was updated successfully, but these errors were encountered: