From 6a3827ef8297b7b282cb38ea07c8eeade99cceae Mon Sep 17 00:00:00 2001 From: Farhan Alam Date: Wed, 15 Jan 2025 17:18:13 -0600 Subject: [PATCH] fix: use splatting to pass arguments from a powershell scope May resolve issue https://github.com/npm/cli/issues/7375 --- bin/npm.ps1 | 4 ++-- bin/npx.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/npm.ps1 b/bin/npm.ps1 index 04a1fd478ef9d..be114a720c80d 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/bin/npx.ps1 b/bin/npx.ps1 index 28dae51b22ca9..139c40a104d27 100644 --- a/bin/npx.ps1 +++ b/bin/npx.ps1 @@ -24,9 +24,9 @@ if (Test-Path $NPM_PREFIX_NPX_CLI_JS) { # Support pipeline input if ($MyInvocation.ExpectingInput) { - $input | & $NODE_EXE $NPX_CLI_JS $args + $input | & $NODE_EXE $NPX_CLI_JS @args } else { - & $NODE_EXE $NPX_CLI_JS $args + & $NODE_EXE $NPX_CLI_JS @args } exit $LASTEXITCODE