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

Winget language and errors with the detection rules #10

Open
mdurini-swisscom opened this issue Dec 31, 2023 · 3 comments
Open

Winget language and errors with the detection rules #10

mdurini-swisscom opened this issue Dec 31, 2023 · 3 comments

Comments

@mdurini-swisscom
Copy link

Hi, I found that winget output language is based on the Microsoft Account display language. The detection rule is searching for the string "version:" at a certain point, but in my output is "versione:" (italian), so it's failing. I can workaround it, changing the detection rules of my package, but it will be nice if you will find a way to have this check language agnostic. Thank you in advance

@SorenLundt
Copy link
Owner

Hi,
The detection script is built up by running winget commands and extract results and use within script/variables etc.
Winget does not give us any option to output using a different language and rewriting the script to support every language is a challenge of course.
However maybe we could re-write the script to find the version without actually using "version:" in the search.

Any other ideas ?

@InnovationForge-com
Copy link
Contributor

Hi,
I had the same issue even though I have an English Windows. That's because Winget CLI uses the language which is first in the priority list under the Windows Language settings. Which was German in my case.
So, in theory a workaround is to put English always first, even if another system language is used.

Another workaround would be to use the Winget PowerShell module like mentioned here: microsoft/winget-cli#3461
Sadly, it's not part of the default install but it seems to be regularly updated by Microsoft and mentioned in the official Winget release log.

https://www.powershellgallery.com/packages/Microsoft.WinGet.Client
Commands to use to get the package infos:
Find-WinGetPackage
Get-WinGetPackage

@SorenLundt
Copy link
Owner

SorenLundt commented Apr 4, 2024

Hi,
Yeah, basically it means that Winget-Wrapper only support en-US currently, until a solution is found.
Using the WinGet PowerShell Module makes sense, however requires a huge tasks to re-write big parts of WinGet-Wrapper.

Also had a look at the Module Microsoft.WinGet.Client as you mentioned and unfortunately it does not support running in SYSTEM context,. And actually using winget with system context was the exact reason winget-wrapper started..
See the issue here: https://github.com/microsoft/winget-cli/issues/4422

If you have a good solution and a chance to work on this, i appreciate collaboration in form of a pull request

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

No branches or pull requests

3 participants