fix(shim): Specify command arg for bash - fix #3878

This commit is contained in:
Rashil Gandhi
2021-12-04 02:05:15 +05:30
parent 6387b7d1cd
commit 2ec00d576c
+2 -2
View File
@@ -624,9 +624,9 @@ if %errorlevel% equ 0 (
"#!/bin/sh
# $resolved_path
if command -v pwsh.exe &> /dev/null; then
pwsh.exe -noprofile -ex unrestricted `"$resolved_path`" $arg `"$@`"
pwsh.exe -noprofile -ex unrestricted -command `"& '$resolved_path' $arg $@;exit \`$lastexitcode`"
else
powershell.exe -noprofile -ex unrestricted `"$resolved_path`" $arg `"$@`"
powershell.exe -noprofile -ex unrestricted -command `"& '$resolved_path' $arg $@;exit \`$lastexitcode`"
fi" | Out-File $shim -Encoding ASCII
} elseif ($path -match '\.jar$') {
warn_on_overwrite "$shim.cmd" $path