From c9754a30a08c38200dc59947b7290c3f888caf9d Mon Sep 17 00:00:00 2001 From: "L. Yeung" Date: Mon, 9 Oct 2023 20:39:52 +0800 Subject: [PATCH] fix(shim): Avoid unexpected output of `list` subcommand --- libexec/scoop-shim.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/scoop-shim.ps1 b/libexec/scoop-shim.ps1 index 41263afe6a..aa45190e22 100644 --- a/libexec/scoop-shim.ps1 +++ b/libexec/scoop-shim.ps1 @@ -12,7 +12,7 @@ # # To list all shims or matching shims, use the 'list' subcommand: # -# scoop shim list [/...] +# scoop shim list [/...] # # To show a shim's information, use the 'info' subcommand: # @@ -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