-
Notifications
You must be signed in to change notification settings - Fork 40
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
[BUG] *.CMD shims don't work when they are in paths containing shell metachars #45
Comments
This is a real issue (and well researched!). Any reason not to do this? |
We recently made the shift in npm v7 to use puka for exactly this purpose when passing arguments to cmd.exe. (And in the process, seem to have broken passing empty strings with Patch welcome! |
in set command parametr value read from %~p* parameter extension needed to be quoted to avoid special characters from path breaking command
in set command parameter value read from %~p* parameter extension needed to be quoted to avoid special characters from path breaking command
this commit: 4c37e04 caused this issue because this: SET dp0=%~dp0 will result in a wrong dir if the path is something like c:\something&somemore\ thing is if i quoted it SET dp0="%~dp0" then it doesn't work further in the script because then the dp0 variable has quotes (a bit stupid of cmd...) But for me kind of reverting that above commit works for me (so not using the "dp0" variable that has the content of ~dp0 |
What / Why
When
&
).Where
How
Current Behavior
Steps to Reproduce
Two scenarios come to mind.
Scenario 1: Set NPM Prefix to New Path
Scenario 2: Local Dependencies
"trymkdir": "mkdirp mytestfolder"
)npm run trymkdir
Expected Behavior
Who
References
The text was updated successfully, but these errors were encountered: