microsoft / microsoft/winget-cli

Getting all exception errors when using `winget upgrade --all`

Open
#3,432 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Upgrade Issue-Feature
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Discussed in https://github.com/microsoft/winget-cli/discussions/3338

Originally posted by TheAlienDrew June 12, 2023
I'm trying to script winget upgrade --all and display certain messages based on the successfulness of the script.

Unfortunately, there's only one error exit code for this command, which makes trying to track down the issue (when automating) a lot harder.

I don't want to scrape winget output or the logs as that feels very tedious. Is there, or will there be, a way, to get a list of all the application install exit codes when running this command?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to doc/windows/package-manager/winget/returnCodes.md and the winget upgrade --all entry point. Read the documented single failure code and the command's output and log behavior first; done means automation can obtain each application's install exit code without scraping output or logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.