-
Notifications
You must be signed in to change notification settings - Fork 16
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
Get-WGPackage Needs to recognize non-English results #1
Comments
You could also try running the native Winget command.
And see what you get. |
Thanks, Winget is working fine. But wingettools via search Firefox | get-wgpackage converts it to a powershell object and that's exactly what I need to list the result in a gridview. I did update software via Winget on my Windows 10 machine, maybe some dependency broke? |
What version of winget are you using?
And what is the exact command you are trying to run?
|
I did install Winget via wingettools today, so I assume Winget is the latest version(?) I have a textbox which contains the item to search for in value $textbox I have it on both a production system as well as a vanilla w10 system to which I install prereqs (wingettools, nuget, winget etc). |
Thanks for your input! |
I suppose it could have been a back-end problem with the package repository. I'll leave this issue open for now. |
I could reproduce on another (company build) system. Might be related to that system (on which it worked before). PS C:\WINDOWS\system32> get-wgpackage firefox -Verbose URL voor opmerkingen bij de release: https://www.mozilla.org/en-US/firefox/96.0.3/releasenotes/ Name ID Version Description VERBOSE: [16:08:15.1048852 END ] Ending Get-WGPackage |
This helps. At least I can see that winget is getting the package. Now I need to see what the package data isn't getting properly processed by the function. |
I wonder if there is a culture problem with the output from winget and my parsing function. Can you run |
Yeah, I found at least one problem already with the regex patterns where I made the silly assumption winget output would always be in Engilish. |
Definitely, a language issue that is going to be complicated to resolve. |
Thanks for the input. Could I (temporarily) force the output to English? That would be fine for me as a workaround. |
This is apparently a known problem with Microsoft Store apps which, I think Winget is using behind the scenes. In my research, I found a reference to https://docs.microsoft.com/en-us/powershell/module/international/set-winuserlanguagelist?view=windowsserver2019-ps which might solve the problem. You might be able to add English. I tried adding NL-NL. Or you would need a system running the En-US culture. I think I have a fix for the function. The challenge is the custom formatting file which assumes English. I'm not sure how to handle that yet. |
Thanks! I ll look into it. If I can make it work, I ll let you know the details. |
This works for me as a quickfix: $OriginalLangList = Get-WinUserLanguageList |
That should work for the native |
There is no easy fix on my part. Winget is inconsistent in the data that it returns so it is next to impossible to create a consistent object. Then we have the language issue. I think the best I can do is add some clarity to the documentation and recommend the WinUserLanguage workaround. Can you run this and post the result: Get-Culture
Get-UiCulture
$OriginalLangList = Get-WinUserLanguageList
Set-WinUserLanguageList en-BE -Force -ErrorAction SilentlyContinue
get-wgpackage firefox -verbose | Select *
Set-WinUserLanguageList -LanguageList $OriginalLangList -Force It may be easiest to start a transcript, run the commands, then post the file. This will help with my documentation and help me better understand what is happeining. |
Sorry, didn't see reply. Will check & update post. |
Closing the issue as stale but will happily re-open. |
Hi,
First of all: great work guys!
I'm building small GUI on Winget with your wingettools.
Now Get-WGPackage seemed to work fine but suddenly stopped working.
F.e. Get-WGPackage Firefox shows no output.
Found https://www.powershellgallery.com/packages/WingetTools/0.6.0/Content/functions%5CGet-WGPackage.ps1 but didn't help me with analysis.
Any idea howto troubleshoot?
Thanks!
Steven
The text was updated successfully, but these errors were encountered: