microsoft / microsoft/winget-cli
Improve error message when portable is already installed (latest version)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
If an attempt is made to install a portable package (compressed) and the package is already the latest version, the error message should be more descriptive.
Originally reported in:
- #5670
The diagnostic script found that winget install returns a failure exit code (-1978335189) when the target package is already installed and is at the latest version.
This is problematic for scripting and automation, as it incorrectly signals a critical failure when the desired state (the package being installed) is already satisfied.
Expected Behavior: WinGet should detect the existing installation, confirm it's up-to-date, and exit gracefully with a success code (0) or a specific, documented code for "already installed."
Actual Behavior: WinGet attempts an upgrade, fails to find one, and then terminates with a generic failure code, making it indistinguishable from a real error.
Proposed technical implementation details
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the winget install path for a compressed portable package that is already installed at its latest version, as described by the diagnostic script. Trace the WinGet CLI handling for this state and confirm that it is distinguished from a real failure, with the resulting success or documented exit code matching the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100