Open joeywatts opened 4 years ago
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 ""
to npm scripts, which will likely be fixed soon.). Unfortunately, translating the logic required into batch and powershell is nontrivial.
Patch welcome!
this commit: https://github.com/npm/cmd-shim/commit/4c37e048dee672237e8962fdffca28e20e9f976d
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...) what we kind of want is get the full string without quotes
But for me kind of reverting that above commit works for me (so not using the "dp0" variable that has the content of ~dp0 but directly use ~dp0 everywhere..
what is exactly the problem with this pull request? https://github.com/npm/cmd-shim/pull/53/commits/022fcf1b0920ab0f83622516bf52c2be325b7483
because that keeps the current behavior quite as is and seems to fix the problem or does that really result in the same problem as issue #10 ?
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