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

Allow running Node modules binaries on Windows #35

Merged
merged 2 commits into from
Aug 25, 2024
Merged

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Aug 25, 2024

Fixes #12.

By default, on Windows, node:child_process does not allow running npm nor any Node modules binary (without doing some tricks). This PR fixes this.

As a side effect, this PR also fixes support for the PATHEXT environment variable on Windows. As another side effect, it allows running .cmd and .bat files.

This is basically a reduced version of what Execa (through node-cross-spawn and its dependency which) is doing, but in much fewer bytes, and minus shebang support (which would be slightly too big to implement).

@sindresorhus sindresorhus merged commit 6affb7e into main Aug 25, 2024
12 checks passed
@sindresorhus sindresorhus deleted the windows-binaries branch August 25, 2024 07:34
@sindresorhus
Copy link
Owner

Awesome to see you managed this in so little code 🎉

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

Successfully merging this pull request may close these issues.

Windows support
2 participants