Skip to content

Commit c93be4c

Browse files
authored
properly escape $NODE_EXE/$NPM_CLI_JS/$NPX_CLI_JS grave key
1 parent 2bd984b commit c93be4c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

bin/npm.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ if ($MyInvocation.Line) { # used "-Command" argument
3232
$NPM_ARGS = $NPM_OG_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim()
3333
}
3434

35+
$NODE_EXE = $NODE_EXE.Replace("``", "````")
36+
$NPM_CLI_JS = $NPM_CLI_JS.Replace("``", "````")
37+
3538
# Support pipeline input
3639
if ($MyInvocation.ExpectingInput) {
3740
$input | Invoke-Expression "& `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS"

bin/npx.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ if ($MyInvocation.Line) { # used "-Command" argument
3232
$NPX_ARGS = $NPX_OG_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim()
3333
}
3434

35+
$NODE_EXE = $NODE_EXE.Replace("``", "````")
36+
$NPX_CLI_JS = $NPX_CLI_JS.Replace("``", "````")
37+
3538
# Support pipeline input
3639
if ($MyInvocation.ExpectingInput) {
3740
$input | Invoke-Expression "& `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS"

0 commit comments

Comments
 (0)