Skip to content

Commit

Permalink
fix(shim): Specify command arg for bash - fix ScoopInstaller#3878
Browse files Browse the repository at this point in the history
  • Loading branch information
rashil2000 authored and se35710 committed Mar 8, 2022
1 parent 46e8bf2 commit eed4b01
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 eed4b01

Please sign in to comment.