microsoft / microsoft/winget-cli

Add an exclude explicit targeting flag for the winget upgrade command

Open
#5,353 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Like for example i always keep getting this when running winget upgrade:

Name    Id              Version              Available            Source
------------------------------------------------------------------------
Spotify Spotify.Spotify 1.2.60.564.gcc6305cb 1.2.61.427.g5b75eb06 winget
2 upgrades available.

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9187 1.0.9188  winget

If i run let's say a winget upgrade --exclude-explicit-targeting command should only say 1 upgrade available and that being Spotify.

Proposed technical implementation details

Add a flag that can only be used after upgrade called --exclude-explicit-targeting that excludes any packages that require explicit targeting for upgrade. Discord auto updates itself and i already have the latest version.

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 winget upgrade command and its argument handling, then trace how packages requiring explicit targeting are selected for upgrade output. Done means the new --exclude-explicit-targeting option works only with upgrade and omits those packages from the available-upgrades result.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.