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

Problems with Module and Commands #18

Closed
Frxhb opened this issue Jan 26, 2023 · 3 comments · Fixed by #20
Closed

Problems with Module and Commands #18

Frxhb opened this issue Jan 26, 2023 · 3 comments · Fixed by #20
Labels
bug Something isn't working

Comments

@Frxhb
Copy link

Frxhb commented Jan 26, 2023

Hey there,

I have some problems searching for packages using your PowerShell Module.

If I run Find-WinGetPackage -ID xy or Get-WinGetPackage -ID xy I receive the following error:

2023-01-26 10_37_17-Greenshot

Yes, Firefox is installed. No, GIMP is not installed.

Windows-Paket-Manager v1.4.10173
Windows: Windows.Desktop v10.0.22621.1105
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.19.10173.0

Please tell me if you need more information.
Thanks for your work.

english transaltion (used deepl):

Select-String : The string "{0} updates available." is not a valid regular expression: "{0} updates available." will be
parsed - quantifier {x,y} after nothing.
In C:\Program Files\WindowsPowerShell\Modules\Cobalt\0.3.2\Cobalt.psm1:637 characters:28
+ ...  ($output | Select-String -Pattern $languageData.AvailableUpgrades,'- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Select-String], ArgumentException
    + FullyQualifiedErrorId : InvalidRegex,Microsoft.PowerShell.Commands.SelectStringCommand
@ethanbergstrom
Copy link
Owner

ethanbergstrom commented Jan 29, 2023

Thanks for including the english translation, that helped me track down the issue.
It looks like Microsoft broke this by updating their string formats with microsoft/winget-cli#2783

@ethanbergstrom ethanbergstrom linked a pull request Jan 29, 2023 that will close this issue
@ethanbergstrom ethanbergstrom added the bug Something isn't working label Feb 4, 2023
@ethanbergstrom
Copy link
Owner

@Frxhb I'm not able to test this myself, but I think this should be resolved for you by upgrading Cobalt to v0.3.3, which is out now on PSGallery.

If it's not, please let me know.

@Frxhb
Copy link
Author

Frxhb commented Feb 9, 2023

@Frxhb I'm not able to test this myself, but I think this should be resolved for you by upgrading Cobalt to v0.3.3, which is out now on PSGallery.

If it's not, please let me know.

Thanks alot. Now its working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants