diff --git a/bin/npm.ps1 b/bin/npm.ps1 index 77bc9a5777c80..86ec4f4de7a22 100644 --- a/bin/npm.ps1 +++ b/bin/npm.ps1 @@ -37,7 +37,7 @@ if ($MyInvocation.Line) { # used "-Command" argument # Support pipeline input if ($MyInvocation.ExpectingInput) { - $input = (@($input) -join "`n").Replace("``", "````") + $input = (@($input) -join "`n").Replace("``", "````").Replace("`"", "```"") Invoke-Expression "Write-Output `"$input`" | & `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS" } else { diff --git a/bin/npx.ps1 b/bin/npx.ps1 index e89536bf3542a..e63dcce6bfe5d 100644 --- a/bin/npx.ps1 +++ b/bin/npx.ps1 @@ -37,7 +37,7 @@ if ($MyInvocation.Line) { # used "-Command" argument # Support pipeline input if ($MyInvocation.ExpectingInput) { - $input = (@($input) -join "`n").Replace("``", "````") + $input = (@($input) -join "`n").Replace("``", "````").Replace("`"", "```"") Invoke-Expression "Write-Output `"$input`" | & `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS" } else {