microsoft / microsoft/winget-cli
Add a warning for trying to uninstall a dependency
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Description of the new feature / enhancement
WinGet should warn the user if they try to uninstall a package that another installed package depends on, to make sure that the user knows that certain apps may break. I think that it also require an argument to complete the uninstall (--force?), as there's plenty of good reasons the user would want to do it anyway, but they should be informed that certain apps may break.
Sorry if this is totally obvious, but I was removing stuff on my laptop with brew and they had a similar message pop up, so I thought winget should do it too.
Proposed technical implementation details
PS C:\Users\easton> winget uninstall Microsoft.Bob
Warning: Microsoft.Edge relies on Microsoft.Bob, and may not function correctly after Microsoft.Bob is uninstalled.
To continue, add --force to your previous command.
(for posterity, the brew warning)
! easton@Usidore ~/ ~> brew remove mutagen-beta Mon Mar 28 09:31:02 2022
Error: Refusing to uninstall /opt/homebrew/Cellar/mutagen-beta/0.13.1
because it is required by mutagen-compose-beta, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies mutagen-beta
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 at the WinGet uninstall command and the installed-package dependency data. Compare behavior with the proposed Microsoft.Bob and brew examples; done means dependent packages are identified, the user receives a warning, and uninstall proceeds only when the force override is supplied.
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
- Mostly clear
- Newbie friendliness
- 25/100