microsoft / microsoft/winget-cli

Repair-WingetPackageManager -force does not force repair

Open
#4,981 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Brief description of your issue

Running the command Repair-WingetPackageManager with -force does not force a repair. This prevents updates and repairs from being possible even when the application is not working correctly.

Steps to reproduce

Run the command Repair-WingetPackageManager -force -verbose

Expected behavior

DesktopAppInstaller will reinstall or update

Actual behavior

Image
Currently, even if winget is not in a good state, the command will fail

Environment
Windows 11 24H2
V1.9.25190

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

Start at the Repair-WingetPackageManager command entry point and reproduce the issue with Repair-WingetPackageManager -force -verbose on Windows 11. Trace why the force path still fails when DesktopAppInstaller is unhealthy; done means the command can reinstall or update DesktopAppInstaller despite that state, with coverage for the forced-repair behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.