diff --git a/bin/npm.ps1 b/bin/npm.ps1 index 04a1fd478ef9d..dc2559adb0e56 100644 --- a/bin/npm.ps1 +++ b/bin/npm.ps1 @@ -24,9 +24,9 @@ if (Test-Path $NPM_PREFIX_NPM_CLI_JS) { # Support pipeline input if ($MyInvocation.ExpectingInput) { - $input | & $NODE_EXE $NPM_CLI_JS $args + $input | & $NODE_EXE $NPM_CLI_JS -- $args } else { - & $NODE_EXE $NPM_CLI_JS $args + & $NODE_EXE $NPM_CLI_JS -- $args } exit $LASTEXITCODE diff --git a/test/bin/windows-shims.js b/test/bin/windows-shims.js index 71f12dc8e1cdd..83400948ce2b0 100644 --- a/test/bin/windows-shims.js +++ b/test/bin/windows-shims.js @@ -53,7 +53,7 @@ t.test('shim contents', t => { t.test('pwsh', t => { const { diff, letters } = diffFiles(SHIMS['npm.ps1'], SHIMS['npx.ps1']) - t.strictSame(diff, []) + t.strictSame(diff, ['-- ', '-- '], 'only npm powershell uses -- for verbatim args') t.strictSame([...letters], ['M', 'X'], 'all other changes are m->x') t.end() })