Skip to content

Commit

Permalink
fix(scoop-shim): Avoid unexpected output of list subcommand (#5681)
Browse files Browse the repository at this point in the history
* fix(shim): Avoid unexpected output of `list` subcommand

* Update libexec/scoop-shim.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

---------

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
  • Loading branch information
lewis-yeung and niheaven authored Oct 10, 2023
1 parent 3a3f41c commit 2847e0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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:** Avoid unexpected output of `list` subcommand ([#5681](https://github.com/ScoopInstaller/Scoop/issues/5681))

### Performance Improvements

Expand Down
4 changes: 2 additions & 2 deletions libexec/scoop-shim.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# To list all shims or matching shims, use the 'list' subcommand:
#
# scoop shim list [<shim_name>/<pattern>...]
# scoop shim list [<regex_pattern>...]
#
# To show a shim's information, use the 'info' subcommand:
#
Expand Down Expand Up @@ -144,7 +144,7 @@ switch ($SubCommand) {
$other | ForEach-Object {
try {
$pattern = $_
[Regex]::New($pattern)
[void][Regex]::New($pattern)
} catch {
Write-Host "ERROR: Invalid pattern: " -ForegroundColor Red -NoNewline
Write-Host $pattern -ForegroundColor Magenta
Expand Down

0 comments on commit 2847e0a

Please sign in to comment.