fix(powershell): improve argument parsing#8539
fix(powershell): improve argument parsing#8539wraithgar merged 7 commits intonpm:latestfrom alexsch01:latest
Conversation
|
OK PR is ready now |
|
We're getting more cases that aren't covered by tests. However, the Windows Shims Test is already taking over 7 min. It loops over 7 shells (times 6 tests). Either the test itself needs a performance improvement, or we should have a separate test just for PowerShell that covers the recently added cases. |
The first one is required if you don't want to include the call (&) operator It's also better code in this PR since we used to assume InvocationName was always in the command and that isn't true |
|
looks good |
|
Made a minor variable name change |
improve the argument parsing PS1 logic
& npm argsand. npm argsproperlyC:\"Program Files"\nodejs\npm.ps1 argsof course ^ for both npm and npx version of the script
Code Explanation: instead of getting the
CommandElements.Extent.Textarray and joining it with spaces right away, now it's getting the same array and only capturing everything after the first element@wraithgar @mbtools sorry about this right after the other PR