microsoft / microsoft/winget-cli

Add confirmation prompt like in apt, pacman, etc.

Open
#1,270 6 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
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.

  1. The user types "winget (one of install/upgrade/uninstal) (package)".
  2. The computer displays information about the package that would be installed, upgraded, or uninstalled.
  3. The computer asks "Do you want to continue (Y/n)?" assuming "Yes" as the default if the user simply presses Enter.
  4. 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.
  5. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.