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

fix(win32): handle cases where "node" is quoted #102

Merged
merged 1 commit into from Aug 23, 2019
Merged

fix(win32): handle cases where "node" is quoted #102

merged 1 commit into from Aug 23, 2019

Conversation

isaacs
Copy link
Collaborator

@isaacs isaacs commented Aug 23, 2019

This fixes an issue which was triggered by npm v6.11, where the
"program" referenced by a shimmed shebang is always quoted (whereas
before, it would not be). Ironically, the code change in npm was to
work around cases where a user puts "jslint" in a batch file,
resulting in the wrong %~dp0 being loaded. The fix triggered the same
behavior in NYC, and the same fix resolves the problem here.

For arcane and mysterious reasons, calling a subroutine in a batch file
causes the %~dp0 variable to be set properly.

This fixes an issue which was triggered by npm v6.11, where the
"program" referenced by a shimmed shebang is always quoted (whereas
before, it would not be).  Ironically, the code change in npm was to
work around cases where a user puts `"jslint"` in a batch file,
resulting in the wrong %~dp0 being loaded.  The fix triggered the same
behavior in NYC, and the same fix resolves the problem here.

For arcane and mysterious reasons, calling a subroutine in a batch file
causes the %~dp0 variable to be set properly.
@bcoe bcoe merged commit aac8730 into v1.x Aug 23, 2019
@bcoe bcoe deleted the fix-cmd-shim branch August 23, 2019 19:52
coreyfarrell pushed a commit to coreyfarrell/spawn-wrap that referenced this pull request Sep 6, 2019
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.

None yet

2 participants