File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,14 @@ if (Test-Path $NPM_PREFIX_NPM_CLI_JS) {
22
22
$NPM_CLI_JS = $NPM_PREFIX_NPM_CLI_JS
23
23
}
24
24
25
+ $NPM_ARGS = $MyInvocation.Line.Substring ($MyInvocation.InvocationName.Length ).Trim()
26
+ $INVOKE_NPM = " $ ( $NODE_EXE -Replace ' ' , ' ` ' ) $ ( $NPM_CLI_JS -Replace ' ' , ' ` ' ) $NPM_ARGS " .Trim()
27
+
25
28
# Support pipeline input
26
29
if ($MyInvocation.ExpectingInput ) {
27
- $input | & $NODE_EXE $NPM_CLI_JS $args
30
+ $input | Invoke-Expression $INVOKE_NPM
28
31
} else {
29
- & $NODE_EXE $NPM_CLI_JS $args
32
+ Invoke-Expression $INVOKE_NPM
30
33
}
31
34
32
35
exit $LASTEXITCODE
Original file line number Diff line number Diff line change @@ -22,11 +22,14 @@ if (Test-Path $NPM_PREFIX_NPX_CLI_JS) {
22
22
$NPX_CLI_JS = $NPM_PREFIX_NPX_CLI_JS
23
23
}
24
24
25
+ $NPX_ARGS = $MyInvocation.Line.Substring ($MyInvocation.InvocationName.Length ).Trim()
26
+ $INVOKE_NPX = " $ ( $NODE_EXE -Replace ' ' ' ` ' ) $ ( $NPX_CLI_JS -Replace ' ' ' ` ' ) $NPX_ARGS " .Trim()
27
+
25
28
# Support pipeline input
26
29
if ($MyInvocation.ExpectingInput ) {
27
- $input | & $NODE_EXE $NPX_CLI_JS $args
30
+ $input | Invoke-Expression $INVOKE_NPX
28
31
} else {
29
- & $NODE_EXE $NPX_CLI_JS $args
32
+ Invoke-Expression $INVOKE_NPX
30
33
}
31
34
32
35
exit $LASTEXITCODE
You can’t perform that action at this time.
0 commit comments