Skip to content

Commit

Permalink
fix(scoop-shim): Check literal path in Get-ShimPath (#5680)
Browse files Browse the repository at this point in the history
Co-authored-by: Rashil Gandhi <[email protected]>
  • Loading branch information
lewis-yeung and rashil2000 authored Oct 10, 2023
1 parent 2847e0a commit 14b38b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- **scoop-checkup:** Change the message level of helpers from ERROR to WARN ([#5549](https://github.com/ScoopInstaller/Scoop/issues/5614))
- **scoop-(un)hold:** Correct output the messages when manifest not found, (already|not) held ([#5519](https://github.com/ScoopInstaller/Scoop/issues/5519))
- **scoop-update:** Change error message to a better instruction ([#5677](https://github.com/ScoopInstaller/Scoop/issues/5677))
- **shim:** Check literal path in `Get-ShimPath` ([#5680](https://github.com/ScoopInstaller/Scoop/issues/5680))
- **shim:** Avoid unexpected output of `list` subcommand ([#5681](https://github.com/ScoopInstaller/Scoop/issues/5681))

### Performance Improvements
Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-shim.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function Get-ShimInfo($ShimPath) {
function Get-ShimPath($ShimName, $Global) {
'.shim', '.ps1' | ForEach-Object {
$shimPath = Join-Path (shimdir $Global) "$ShimName$_"
if (Test-Path $shimPath) {
if (Test-Path -LiteralPath $shimPath) {
return $shimPath
}
}
Expand Down

0 comments on commit 14b38b4

Please sign in to comment.