Merge pull request #4555 from ScoopInstaller/ps1-shim-patch

feat(shim): ps1 shim hotfix
This commit is contained in:
Rashil Gandhi
2021-12-02 23:43:50 +05:30
committed by GitHub
+2 -2
View File
@@ -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