Skip to content
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

Windows support #12

Closed
ehmicky opened this issue Aug 22, 2024 · 1 comment · Fixed by #24 or #35
Closed

Windows support #12

ehmicky opened this issue Aug 22, 2024 · 1 comment · Fixed by #24 or #35

Comments

@ehmicky
Copy link
Collaborator

ehmicky commented Aug 22, 2024

See background comments about this in sindresorhus/execa#1147

Windows support is important. But it also requires a fair amount of code.

We can't use node-cross-spawn because it's got too much code for our design goal of keeping this package small. Also, that package is unmaintained (see sindresorhus/execa#578).

I would suggest the following:

  • Create automated tests so we're clear about what does not work on Windows, and so we can document it properly.
  • If there is anything that should be fixed in core Node.js, try to open an issue there.
  • If there's something that is both important and solvable with not too much code, we probably should consider it.
This was referenced Aug 22, 2024
@ehmicky ehmicky reopened this Aug 22, 2024
@ehmicky
Copy link
Collaborator Author

ehmicky commented Aug 23, 2024

I add a closer look at what node-cross-spawn is precisely doing and summarized it here.

Shebang support is nice but requires resolving the executable file path, read its contents, then manipulate the file/arguments. This would require too many bytes to implement. Users can work around this by specifying the runtime explicitly, e.g. node file.js instead of ./file.js.

node-cross-spawn also adds support for the PATHEXT environment variable without using shell: true. We might or might not implement it, depending on whether it can be done in just a few bytes.

However, there is one critical feature that we probably should support. Right now, on Windows, nano-spawn requires shell: true to call any Node module binary (whether installed globally or locally), including npm itself. This is quite important IMHO and we might need to add some logic to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant