From 3c90d1a0701b0b64730dbf9ebc8d31f9b9c238f1 Mon Sep 17 00:00:00 2001 From: Rashil Gandhi Date: Thu, 2 Dec 2021 21:10:23 +0530 Subject: [PATCH] specify command arg --- lib/core.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core.ps1 b/lib/core.ps1 index 8e7b142da..2fb64edb6 100644 --- a/lib/core.ps1 +++ b/lib/core.ps1 @@ -615,9 +615,9 @@ set invalid=`"=' if !args! == !invalid! ( set args= ) where /q pwsh.exe if %errorlevel% equ 0 ( - pwsh -noprofile -ex unrestricted `"& '$resolved_path' $arg %args%;exit `$lastexitcode`" + pwsh -noprofile -ex unrestricted -command `"& '$resolved_path' $arg %args%;exit `$lastexitcode`" ) else ( - powershell -noprofile -ex unrestricted `"& '$resolved_path' $arg %args%;exit `$lastexitcode`" + powershell -noprofile -ex unrestricted -command `"& '$resolved_path' $arg %args%;exit `$lastexitcode`" )" | Out-File "$shim.cmd" -Encoding ASCII warn_on_overwrite $shim $path