Skip to content

Commit 9db2df5

Browse files
committed
fix(shim): Avoid unexpected output of list subcommand
1 parent 3a3f41c commit 9db2df5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
- **scoop-checkup:** Change the message level of helpers from ERROR to WARN ([#5549](https://github.com/ScoopInstaller/Scoop/issues/5614))
3636
- **scoop-(un)hold:** Correct output the messages when manifest not found, (already|not) held ([#5519](https://github.com/ScoopInstaller/Scoop/issues/5519))
3737
- **scoop-update:** Change error message to a better instruction ([#5677](https://github.com/ScoopInstaller/Scoop/issues/5677))
38+
- **shim:** Avoid unexpected output of `list` subcommand ([#5681](https://github.com/ScoopInstaller/Scoop/issues/5681))
3839

3940
### Performance Improvements
4041

libexec/scoop-shim.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
# To list all shims or matching shims, use the 'list' subcommand:
1414
#
15-
# scoop shim list [<shim_name>/<pattern>...]
15+
# scoop shim list [<shim_name>/<regex_pattern>...]
1616
#
1717
# To show a shim's information, use the 'info' subcommand:
1818
#
@@ -144,7 +144,7 @@ switch ($SubCommand) {
144144
$other | ForEach-Object {
145145
try {
146146
$pattern = $_
147-
[Regex]::New($pattern)
147+
[void][Regex]::New($pattern)
148148
} catch {
149149
Write-Host "ERROR: Invalid pattern: " -ForegroundColor Red -NoNewline
150150
Write-Host $pattern -ForegroundColor Magenta

0 commit comments

Comments
 (0)