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 list --upgrade-available cannot be sorted and PowerShell module does not support listing upgrades #4773

Closed
alimbada opened this issue Aug 29, 2024 · 2 comments · Fixed by #4781
Labels
In-PR Issue related to a PR Issue-Docs It's a documentation issue that really should be on MicrosoftDocs PowerShell Issue related to WinGet PowerShell Module or cmdlet
Milestone

Comments

@alimbada
Copy link

alimbada commented Aug 29, 2024

winget list --upgrade-available cannot be piped to sort so via a StackOverflow answer and a couple of other issues on this repo (here and here) I found myself installing the Powershell module.

However, the module does not seem to have a way of listing available upgrades. Get-WinGetPackage has -Query and -MatchOption options (shown when tabbing for autocompletion) which do not seem to be in the current source code (maybe they're inherited?). However, these options seem to only match on strings.

I attempted to do Get-WinGetPackage | where { -not ([string]::IsNullOrWhitespace($_.AvailableVersions)) } but I get 95 results (there are quite a few results where the Available field is empty yet the package still makes it through the filter) whereas winget list --upgrade-available lists 46 upgrades.

If there is another way to list available upgrades it's not obvious and should be better documented.

Environment

Windows Package Manager v1.8.1911
Windows: Windows.Desktop v10.0.19045.4780
Package: Microsoft.DesktopAppInstaller v1.23.1911.0
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Aug 29, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@alimbada
Copy link
Author

The bot has indirectly answered my question but I'm not closing this as it needs better documentation.

@denelon denelon added Issue-Docs It's a documentation issue that really should be on MicrosoftDocs PowerShell Issue related to WinGet PowerShell Module or cmdlet and removed Needs-Triage Issue need to be triaged labels Aug 30, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR Issue related to a PR label Sep 1, 2024
denelon pushed a commit that referenced this issue Sep 3, 2024
- [x] I have signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs).
- [x]  This pull request is related to an issue
	- Closes #4773


Each change is broken into a separate commit to help with reviewing.
Changes include:
- Couple more examples for cmdlets
- Linter fixes. Majority of them involve newline after a heading &
code-fenced blocks wanting a language tag

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4781)
@denelon denelon added this to the 1.9 Client milestone Oct 10, 2024
@denelon denelon added this to WinGet Oct 22, 2024
@denelon denelon moved this to Done in WinGet Oct 22, 2024
@denelon denelon moved this from Done to Released in WinGet Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR Issue related to a PR Issue-Docs It's a documentation issue that really should be on MicrosoftDocs PowerShell Issue related to WinGet PowerShell Module or cmdlet
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants