From 147936a96223c043c19054e32ca384265b082747 Mon Sep 17 00:00:00 2001 From: Alex Schwartz Date: Thu, 15 May 2025 17:22:50 -0400 Subject: [PATCH] fix(powershell): properly escape quotes --- bin/npm.ps1 | 2 +- bin/npx.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {