Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scoop shim list scoo* not work as expected (Options MatchTimeout RightToLeft) #5568

Closed
gigberg opened this issue Jul 1, 2023 · 4 comments · Fixed by #5424
Closed

scoop shim list scoo* not work as expected (Options MatchTimeout RightToLeft) #5568

gigberg opened this issue Jul 1, 2023 · 4 comments · Fixed by #5424
Labels

Comments

@gigberg
Copy link

gigberg commented Jul 1, 2023

To list all shims or matching shims, use the 'list' subcommand: scoop shim list [<shim_name>/...]. However scoop shim list scoo* returns as follow:
image
Obviously, this not output as expected. seem this:
image

The related source code is $shims.ForEach({ Get-ShimInfo $_ }) | Add-Member -TypeName 'ScoopShims' -PassThru, when I use vscode debug and breakpoint in this line, and then run the same command in terminal manually "$shims.ForEach({ Get-ShimInfo $_ }) | Add-Member -TypeName 'ScoopShims' -PassThru", the outputs is right.
image

Anyway, I do not know what make this inconsistency. Could anybody give some help?

@gigberg gigberg added the bug label Jul 1, 2023
@rashil2000
Copy link
Member

This is a regression from #5125
/cc @niheaven @lewis-yeung

@niheaven
Copy link
Member

niheaven commented Oct 9, 2023

Will check it. Too busy recently, sorry.

@lewis-yeung

This comment was marked as off-topic.

@lewis-yeung
Copy link
Contributor

lewis-yeung commented Oct 9, 2023

The output

Options RightToLeft MatchTimeout
------- ----------- ------------
   None       False -00:00:00.0010000

is produced by the following code:

[Regex]::New($pattern)

This can be discarded. If we add a [void], it will disappear:

[void][Regex]::New($pattern)

and the expected output will show up:

Name       Source   Alternatives IsGlobal IsHidden
----       ------   ------------ -------- --------
scoop-slim External              False    False
scoop      scoop                 False    False

BTW, I think we can clarify in the help message that regular expression matching is used here: scoop shim list [<shim_name>/<regex_pattern>...].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants