microsoft / microsoft/winget-cli

Add --ErrorAction to standardize bypass flags

Open
#3,358 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Another thought, what if we include a new parameter "--continueOnError" that when applied would continue the download of the main and dependencies even after a single dependency fails.

I'd propose a more generic -ErrorAction like PowerShell's implementation where WinGet would respect stop, continue, silentlyContinue, inquire, ignore and maybe even suspend. This would probably make the PowerShell cmdlet implementation and could also be useful in other areas too. It could replace the IgnoreUnavailable argument for the import flow, could be used to set the behavior of upgrade all, could be used to continue when depenency installation fails, and would be a great option as a generic parameter for scripting

Originally posted by @Trenly in https://github.com/microsoft/winget-cli/issues/2953#issuecomment-1593548891

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 existing IgnoreUnavailable behavior and the affected import, upgrade-all, dependency-installation, and PowerShell cmdlet entry points mentioned in the issue. Define the supported ErrorAction values and how each applies across those flows, then verify that scripting behavior and dependency-failure handling are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.