Winget-cli: 'install git' matches multiple apps, messaging unclear

Created on 13 May 2020  路  12Comments  路  Source: microsoft/winget-cli

Environment

winget --info
Windows Package Manager v0.1.41301 Preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19041.208
Package: Microsoft.DesktopAppInstaller v1.0.41301.0

Links:
  Privacy Statement: https://aka.ms/winget-privacy
  License agreement: https://aka.ms/winget-license
  3rd Party Notices: https://aka.ms/winget-3rdPartyNotice
  Homepage:          https://aka.ms/winget

Steps to reproduce

Attempt to install git with winget:

winget install git

Expected behavior

Git installs without further prompting.

Actual

Git fails to install. Unclear for the user what to do next.

Multiple apps found matching input criteria. Please refine the input.
Name                    Id                                Version      Matched
-----------------------------------------------------------------------------------
Git                     Git.Git                           2.26.2       Moniker: git
Atom                    GitHub.Atom                       1.45.0
GitKraken               Axosoft.GitKraken                 6.5.4
Logitech Harmony Remote Logitech.Harmony                  1.0.1.308
GitHub Desktop          GitHub.GitHubDesktop              2.4.3
AppInstallerFileBuilder Microsoft.AppInstallerFileBuilder 1.2020.211.0 Tag: GitHub

馃弳 For a bonus: Why are "Atom" and "Logitech Harmony Remote" packages returned in the list when installing git?

Issue-Task

Most helpful comment

Providing actionable error messages, esp. with command-line tools is HIGHLY recommended, but then, if the tool can determine that the user likely actually wanted to install git and therefore they should type git.git ... why not just install git like they asked?

While I appreciate (and like) the fuzzy search when searching apps, I'd argue that name resolution when installing apps should be MUCH more precise, and should perhaps match on moniker, then name, then ID, in that order

All 12 comments

@bitcrazed I've tagged this as a Task for someone to improve the message. The user in this case would need to specify by "Id" so the command would be "winget install git.git". Would it make more sense to you to have the client provide an example?

Multiple apps found matching input criteria. Please refine the input.
Example: winget install Git.Git

Your bonus馃弳
Search is doing a fuzzy search across multiple fields.
Atom - Id: GitHub.Atom
Logitech Harmony Remote - Name: Logitech Harmony Remote

Providing actionable error messages, esp. with command-line tools is HIGHLY recommended, but then, if the tool can determine that the user likely actually wanted to install git and therefore they should type git.git ... why not just install git like they asked?

While I appreciate (and like) the fuzzy search when searching apps, I'd argue that name resolution when installing apps should be MUCH more precise, and should perhaps match on moniker, then name, then ID, in that order

Yeah, please make the install search far more precise. I tried installing .NET Core soon after the news dropped. winget install dotnet matches both .NET Core and .NET Framework. Searching by ID (winget install --id microsoft.dotnet) gave me the same result. Took me two more minutes figuring out the intended way of installing it via the moniker.

I think it would help if the matched text is highlighted with an alternate color when dealing with ambiguous/multiple results.

I mean, I am not blind. I see why both are results. I just want the install side of things to expect wholly unambiguous queries, instead of winget forcing the developer to find the one value that disambiguates it and then repeat their query with the right switch flipped. Highlighting would be totally fine when searching for available packages.

D:\ndr\src > winget install --id git.git
Multiple apps found matching input criteria. Please refine the input.
Name   Id         Version
-------------------------
Git    Git.Git    2.26.2
GitLFS Git.GitLFS 2.11.0
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 1:57 PM
D:\ndr\src > winget install --exact --id git.git
No app found matching input criteria.
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 2:01 PM

Note the casing requirement and the --exact.

From using Linux with larger package repositories and community repos. I can say fuzzy search is a required inconvenience.

At the moment, when installing apps with multiple search results, the following nomenclature is working perfectly:

winget install --name <appName> -e

Note that the _appName_ is Case Sensitive !

D:\ndr\src > winget install --id git.git
Multiple apps found matching input criteria. Please refine the input.
Name   Id         Version
-------------------------
Git    Git.Git    2.26.2
GitLFS Git.GitLFS 2.11.0
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 1:57 PM
D:\ndr\src > winget install --exact --id git.git
No app found matching input criteria.
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 2:01 PM

Note the casing requirement and the --exact.

I had the same issue as well. Found the above fix of using the --name -e worked. It looks like it could be a case sensitive issue.

At the moment, when installing apps with multiple search results, the following nomenclature is working perfectly:

winget install --name <appName> -e

Note that the _appName_ is Case Sensitive !

It works. And then a graphical installer appears. I just expected as silently installing as Ubuntu did.

I agree. This is too complicated. I don't want to study winget to be able to use winget. And I found this issue because I couldn't get winget to instal git.git even after looking at the docs for 5 minutes.

Fuzzy search is great -- when I do a winget search or my winget install doesn't exist, like for "git".

But when I want to install something, I want simple commands. winget install should accept the exact id by default. So winget install git.git installs that package and winget install git should give you an error that a package with that name does not exist, but also do a fuzzy search for git to suggest what you probably meant.

At the very least winget install --id should expect an exact match and not ask me whether I want to install git.git or git.gitlfs when I specifically wrote winget install --id git.git.

Ps. oh, and case sensitive app names just asks for trouble. Hypothetically, what would be the difference between "Git.Git" and "git.git"? The former is the official package, the latter could be malware. It's even worse than NPM...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

denelon picture denelon  路  4Comments

sayedarifuddin picture sayedarifuddin  路  3Comments

TravisSpomer picture TravisSpomer  路  3Comments

Daegalus picture Daegalus  路  5Comments

denelon picture denelon  路  3Comments