microsoft / microsoft/winget-cli

Wrong documentation or argument order

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

Nobody has claimed this yet.

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

Description

Brief description of your issue

Actual command syntax does not reflect documentation.

Command help winget list --help shows:

Windows Package Manager (Preview) v1.4.2161-preview
Copyright (c) Microsoft Corporation. All rights reserved.

The list command displays the packages installed on the system, as well as whether an update is available. Additional options can be provided to filter the output, much like the search command.

usage: winget list [[-q] <query>] [<options>]

The following command aliases are available:
  ls

The following arguments are available:
  -q,--query                  The query used to search for a package

The following options are available:
  --id                        Filter results by id
  --name                      Filter results by name
  --moniker                   Filter results by moniker
  -s,--source                 Find package using the specified source
  --tag                       Filter results by tag
  --cmd,--command             Filter results by command
  -n,--count                  Show no more than specified number of results (between 1 and 1000)
  -e,--exact                  Find package using exact match
  --header                    Optional Windows-Package-Manager REST source HTTP header
  --accept-source-agreements  Accept all source agreements during source operations

More help can be found at: https://aka.ms/winget-command-list

Note the argument order: winget list [[-q] <query>] [<options>]

Using this command syntax, I get an error:

PS C:\> winget list Element.Element --id
Windows Package Manager (Preview) v1.4.2161-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Argument value required, but none found : '--id'
Steps to reproduce

To show the help: winget list --help

Write a query according to the usage in the help: winget list Element.Element --id

Expected behavior

Proper results. For example:

Name    Id              Version Available Source
------------------------------------------------
Element Element.Element 1.11.5            winget
Element Element.Element 1.10.1  1.11.5    winget
Actual behavior

Error Argument value required, but none found : '--id'

Environment
Windows Package Manager (Preview) v1.4.2161-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.978
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.2161.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links               
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

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 reproducing winget list --help and winget list Element.Element --id, then compare the displayed usage with the command's argument parsing. Done means the documented syntax and parser agree, and the reported example returns the expected package results or the help text is corrected to match actual behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
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.