Skip to content

Commit

Permalink
fix(shim): Specify command arg for bash - fix #3878
Browse files Browse the repository at this point in the history
  • Loading branch information
rashil2000 committed Dec 3, 2021
1 parent 6387b7d commit 2ec00d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ec00d5

Please sign in to comment.