microsoft / microsoft/winget-cli
Add confirmation prompt like in apt, pacman, etc.
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
I'd like to see WinGet ask the user for confirmation on whether (s)he actually wants to install or remove packages, as doing so can make potentially detrimental changes to the system if the user doesn't know what (s)he is doing. It would also provide a chance for the user to back out of a winget operation if (s)he changes his/her mind. I realize the User Account Control does a fair job of handling that, but perhaps we can do even better.
Proposed technical implementation details (optional)
Bold text indicates new functionality.
- The user types "winget (one of install/upgrade/uninstal) (package)".
- The computer displays information about the package that would be installed, upgraded, or uninstalled.
- The computer asks "Do you want to continue (Y/n)?" assuming "Yes" as the default if the user simply presses Enter.
- a. The user says Yes by (optionally pressing Y and then) pressing Enter, OR
b. The user changes his/her mind and backs out of the operation by pressing N and then Enter. - a. If "Yes," the computer installs, upgrades, or uninstalls the requested package (as it does now), OR
b. If "No," the computer aborts the operation and returns control to the command prompt.
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 reviewing the WinGet CLI handling for install, upgrade, and uninstall commands, including where package information is displayed before changes are made. Implement the requested confirmation flow with Yes as the default and a No path that returns to the command prompt. Done means each listed operation prompts before changing the system and can be cancelled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100