Skip to content

Commit 635ae17

Browse files
authored
fix(shim): Correctly quote $@ in sh->ps1 shims (#4809)
1 parent 5a795ca commit 635ae17

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Bug Fixes
44

55
- **shim:** Manipulating shims with UTF8 encoding ([#4791](https://github.com/ScoopInstaller/Scoop/issues/4791))
6+
- **shim:** Correctly quote $@ in sh->ps1 shims ([#4808](https://github.com/ScoopInstaller/Scoop/issues/4808))
67
- **installed:** If no `$global`, check both local and global installed ([#4798](https://github.com/ScoopInstaller/Scoop/issues/4798))
78
- **scoop-prefix:** Fix typo that breaks global installed apps ([#4795](https://github.com/ScoopInstaller/Scoop/issues/4795))
89
- **update:** Skip logs starting with `(chore)` ([#4800](https://github.com/ScoopInstaller/Scoop/issues/4800))

lib/core.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,9 @@ function shim($path, $global, $name, $arg) {
697697
"#!/bin/sh",
698698
"# $resolved_path",
699699
"if command -v pwsh.exe > /dev/null 2>&1; then",
700-
" pwsh.exe -noprofile -ex unrestricted -file `"$resolved_path`" $arg $@",
700+
" pwsh.exe -noprofile -ex unrestricted -file `"$resolved_path`" $arg `"$@`"",
701701
"else",
702-
" powershell.exe -noprofile -ex unrestricted -file `"$resolved_path`" $arg $@",
702+
" powershell.exe -noprofile -ex unrestricted -file `"$resolved_path`" $arg `"$@`"",
703703
"fi"
704704
) -join "`n" | Out-UTF8File $shim -NoNewLine
705705
} elseif ($path -match '\.jar$') {

0 commit comments

Comments
 (0)