Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: cmd-shim not identified if placed outside node_modules/.bin/ #158

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

patrickkfkan
Copy link

I have a node executable installed globally with npm i -g . Because of this, the cmd-shim was not placed in node_modules/.bin/. On Windows, this caused cross-spawn to escape arguments only once.

This PR inspects the contents of the target file and if it can obtain the wrapped command, it will take it as cmd-shim and escape arguments twice.

@patrickkfkan
Copy link
Author

Revisiting this, I realize the read-cmd-shim dependency added for this fix requires minimum Node v14.17. This is quite higher than the v8 required by this project, and will essentially throw "bad engine" warnings on builds with legacy Node versions.

I'll leave it to the project devs to decide what to do with this PR.

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

Successfully merging this pull request may close these issues.

3 participants