Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'install git' matches multiple apps, messaging unclear #133

Closed
bitcrazed opened this issue May 12, 2020 · 12 comments
Closed

'install git' matches multiple apps, messaging unclear #133

bitcrazed opened this issue May 12, 2020 · 12 comments

Comments

@bitcrazed
Copy link

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?

@denelon
Copy link
Contributor

denelon commented May 12, 2020

@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

@bitcrazed
Copy link
Author

bitcrazed commented May 13, 2020

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

@JohnMcPMS JohnMcPMS changed the title Can't install git 'install git' matches multiple apps, messaging unclear May 13, 2020
@Dormanil
Copy link

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.

@ocitrev
Copy link

ocitrev commented May 20, 2020

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

@Dormanil
Copy link

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.

@jonwis
Copy link
Member

jonwis commented May 25, 2020

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.

@NicTanghe
Copy link

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

@SubhamK108
Copy link

SubhamK108 commented Jun 3, 2020

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 !

@leepryor
Copy link

leepryor commented Jun 8, 2020

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.

@maisonhai3
Copy link

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.

@danielniccoli
Copy link

danielniccoli commented Jun 27, 2020

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

@denelon
Copy link
Contributor

denelon commented Aug 21, 2020

@denelon denelon closed this as completed Aug 21, 2020
@denelon denelon modified the milestones: Package Manager v0.2.x, v1.0 - Windows Package Manager May 4, 2021
jedieaston added a commit to jedieaston/winget-cli that referenced this issue Nov 17, 2021
2dfc7499 Update Authors file
6dab4978 Update README and tweak syntax in Boost.JSON adapter
2ecd2119 Merge pull request microsoft#136 from matty0ung/boostjson
b1119ccc Merge pull request microsoft#135 from matty0ung/uris
f5cf601e Add Boost.JSON support
14325788 Add Boost.JSON support
d3104ea8 Support fetching sub-schemas from other files
ad7dac75 Merge pull request microsoft#133 from rayvincent2/feature/add-urn-reference-support
3442709a Update urn regex expression to be std::regex safe
f787a8a7 Update urn regex to match widely accepted expression
653d515d Ensure that urn regex checks to end of string
eac0859c Ensure that urn NID cannot include '.'
ef42dae2 Add support for urn document references
a4684c28 Fix path to rapidjson in fuzzing test code
11af6522 Merge remote-tracking branch 'clainio/build-fix'
c5487c39 Update rapidjson to latest code from github
6a04040d Update adapters to avoid inheriting from std::iterator
385d2d83 Improve handling of compiler flags when exceptions are disabled
82e093fe Upgrade gtest to v1.11.0
c63ac26f Disable C4702: unreachable code warnings for json_pointer.hpp
855365bc Disable C4702: unreachable code warnings within relevant headers
5c97e3cc Fix gcc build error
4897d102 Fix exclusiveMaximum and exclusiveMinimum error messages
6cc4cddc Suppress boost warnings that aren't relevant to the test suite
2cf8d3dd Add default tests for draft 7
e94179e1 Add definitions tests for draft 7
bb2c4251 Improve array_iteration_basics example
e6909b15 Add required test for draft 4
df89869e Add maxLength and minLength tests for draft 7
91834621 Fix return type on getMinLength
3740dc51 Explicitly initialise optionals in Subschema class
cb778b6b Minor changes to address msvc warnings and make cmake work on Windows
70f12ed1 Merge pull request microsoft#123 from anishmonachan7/fix_unused_variable
03b8cccb Update include/valijson/constraints/concrete_constraints.hpp
dc6d2fe0 fix unused variable error with gcc 8.3
77bae9fb Fix xcode stuff
66262baf Include nlohmann/json.hpp instead of json.hpp
b3b958c8 Merge pull request microsoft#121 from anishmonachan7/virtual_destructor
84c9fbf5 destructor to virtual destructor
8a784f23 Minor fix for example code in README
a19e1c00 Remove warning suppressions for clang
af2358b6 Use custom RAPIDJSON_ASSERT macro to catch parser errors
7ab96207 Ensure ref values are strings
635f36f0 Merge pull request microsoft#119 from BSipos-RKF/issue-118
fba5a9e8 Reject JSON references that index into empty arrays
cbcde15c Possible fix for microsoft#118
3621f98d Update rapidjson_utils.hpp to use iterative parsing
f544cd02 Merge pull request microsoft#116 from AdamKorcz/fuzz1
c13eed99 Minor refactoring
3a47f0cd Added fuzzer with oss-fuzz build file
cf648930 Merge pull request microsoft#114 from baylesj/fix-memory-leak
1f964c12 Fix memory leak in concrete constraints
7cb31947 Merge pull request microsoft#113 from hei-pa/master
8cc83c8b move curlpp findPackage in EXAMPLES block
c1e75c70 Merge pull request microsoft#110 from baylesj/remote_throws
bc81adbd add version checks around BOOST_NORETURN
7a560db2 Fixup headers
b8e95810 Apply feedback, add boost version check
8f6f9b6a Use deprecated declarations
f1006142 Cleanup unnecessary returns
a30ef974 Add VALIJSON_USE_EXCEPTIONS mode
8a700811 Add JSON Inspector example app
bbfc3f5c Fixed build on certain GCC toolchains
84b67fa6 Merge pull request microsoft#107 from baylesj/readme
90783ca4 Minor code style changes
3dd4482a Merge pull request microsoft#103 from wwriter/cond_schema_errormessage
ee4f85bf Minor tweaks to README.md file
a7038862 Update jsoncpp link in readme
abedaf0e Merge pull request microsoft#105 from baylesj/update-jsoncpp
825ee110 Fix readme
b6b6f167 Delete jsoncpp fuzzing stuff
2ee7474f Delete more unnecessary scripts
1ff5308f fix submodule
dbc4fcc8 Remove modules
88d9d890 Update JsonCpp to 1.9.4
d5091b2d added feature : now users can get a detailed error message when if-then-else conditional constraints are not met
931f64d4 Merge pull request microsoft#102 from mathbunnyru/patch-2
c5e61543 Add conan package manager info
6cda9227 Merge pull request microsoft#99 from mathbunnyru/patch-1
45b0f83b Fix README so the code actually throws, when json is invalid
89e37cbf Fix typo
7f01c391 Minor suggestions from clangtidy
a527564b Merge pull request microsoft#96 from joshuaeckroth/master
ccad6b14 Switched from jsoncpp deprecated Reader to CharReader
45a333e6 Try to make builds faster
0ee3bada Fix broken build
bbe62ecd Merge pull request microsoft#95 from wirenboard/feature/cache-regex
f7f3acf2 Merge pull request microsoft#94 from wirenboard/fix/pass-by-ref
39f35069 Regex objects cache for pattern constraints
2216c2b8 Pass visitor to validationCallback by ref
0db0d139 Merge pull request microsoft#93 from Delgan/fix-unused-args
1c825cc6 Remove unused parameters instead of commenting them out
ca031221 Fix compilation errors due to unused parameters
105e345a Merge pull request microsoft#92 from arthurafarias/add-cmake-interface-library
f60a3089 Added interface target to CMakeLists.txt
d453ee2e Revert breaking changes to jsoncpp_adapter.hpp
f3a0390e Revert changes to json11_adapter.hpp
49c20301 Disable -Wshadow for included header in property_tree_utils.hpp
8875d802 Add CLion paths to .gitignore
73a8e440 More aggressive compiler warnings
77d2ef82 Cosmetic improvements for poco_json_adapter.hpp and property_tree_adapter.hpp
e5c1cbfe Ensure tests are run for Poco, Qt and property_tree adapters
8c0d16a0 Cosmetic improvements for std_string_adapter.hpp, test_json_pointer.cpp and test_poly_constraint.cpp
217b990b Cosmetic improvements for schema_parser.hpp and validation_results.hpp
71f4cdaa Cosmetic improvements for custom_allocator.hpp
e46af245 Cosmetic improvements for concrete_constraints.hpp and basic_constraint.hpp
7917b2f7 Cosmetic improvements for schema.hpp, schema_parser.hpp and subschema.hpp
8150a520 Cosmetic improvements for test_adapter_comparison.cpp
28cc9e8e Cosmetic improvements for qtjson_adapter.hpp
508bc019 Cosmetic improvements for rapidjson_adapter.hpp
d7901d48 Cosmetics improvements for picojson_adapter.hpp
3211a04d Cosmetic improvements for nlohmann_json_adapter.hpp
0f57cb31 Cosmetic improvements for jsoncpp_adapter.hpp
e11c17c3 Cosmetic improvements for json11_adapter.hpp
6f1f4acb Cosmetic improvements for basic_adapter.hpp
3ddbe585 Cosmetic improvements for validation_visitor.hpp
09d21423 Update xcode project files
0481a0bb Minor tidy up of const auto usage
94cef2fa Add example showing local file resolution

git-subtree-dir: src/Valijson/valijson
git-subtree-split: 2dfc7499a31b84edef71189f4247919268ebc74e
jedieaston added a commit to jedieaston/winget-cli that referenced this issue Nov 17, 2021
2dfc7499 Update Authors file
6dab4978 Update README and tweak syntax in Boost.JSON adapter
2ecd2119 Merge pull request microsoft#136 from matty0ung/boostjson
b1119ccc Merge pull request microsoft#135 from matty0ung/uris
f5cf601e Add Boost.JSON support
14325788 Add Boost.JSON support
d3104ea8 Support fetching sub-schemas from other files
ad7dac75 Merge pull request microsoft#133 from rayvincent2/feature/add-urn-reference-support
3442709a Update urn regex expression to be std::regex safe
f787a8a7 Update urn regex to match widely accepted expression
653d515d Ensure that urn regex checks to end of string
eac0859c Ensure that urn NID cannot include '.'
ef42dae2 Add support for urn document references
a4684c28 Fix path to rapidjson in fuzzing test code
11af6522 Merge remote-tracking branch 'clainio/build-fix'
c5487c39 Update rapidjson to latest code from github
6a04040d Update adapters to avoid inheriting from std::iterator
385d2d83 Improve handling of compiler flags when exceptions are disabled
82e093fe Upgrade gtest to v1.11.0
c63ac26f Disable C4702: unreachable code warnings for json_pointer.hpp
855365bc Disable C4702: unreachable code warnings within relevant headers
5c97e3cc Fix gcc build error
4897d102 Fix exclusiveMaximum and exclusiveMinimum error messages
6cc4cddc Suppress boost warnings that aren't relevant to the test suite
2cf8d3dd Add default tests for draft 7
e94179e1 Add definitions tests for draft 7
bb2c4251 Improve array_iteration_basics example
e6909b15 Add required test for draft 4
df89869e Add maxLength and minLength tests for draft 7
91834621 Fix return type on getMinLength
3740dc51 Explicitly initialise optionals in Subschema class
cb778b6b Minor changes to address msvc warnings and make cmake work on Windows
70f12ed1 Merge pull request microsoft#123 from anishmonachan7/fix_unused_variable
03b8cccb Update include/valijson/constraints/concrete_constraints.hpp
dc6d2fe0 fix unused variable error with gcc 8.3
77bae9fb Fix xcode stuff
66262baf Include nlohmann/json.hpp instead of json.hpp
b3b958c8 Merge pull request microsoft#121 from anishmonachan7/virtual_destructor
84c9fbf5 destructor to virtual destructor
8a784f23 Minor fix for example code in README
a19e1c00 Remove warning suppressions for clang
af2358b6 Use custom RAPIDJSON_ASSERT macro to catch parser errors
7ab96207 Ensure ref values are strings
635f36f0 Merge pull request microsoft#119 from BSipos-RKF/issue-118
fba5a9e8 Reject JSON references that index into empty arrays
cbcde15c Possible fix for microsoft#118
3621f98d Update rapidjson_utils.hpp to use iterative parsing
f544cd02 Merge pull request microsoft#116 from AdamKorcz/fuzz1
c13eed99 Minor refactoring
3a47f0cd Added fuzzer with oss-fuzz build file
cf648930 Merge pull request microsoft#114 from baylesj/fix-memory-leak
1f964c12 Fix memory leak in concrete constraints
7cb31947 Merge pull request microsoft#113 from hei-pa/master
8cc83c8b move curlpp findPackage in EXAMPLES block
c1e75c70 Merge pull request microsoft#110 from baylesj/remote_throws
bc81adbd add version checks around BOOST_NORETURN
7a560db2 Fixup headers
b8e95810 Apply feedback, add boost version check
8f6f9b6a Use deprecated declarations
f1006142 Cleanup unnecessary returns
a30ef974 Add VALIJSON_USE_EXCEPTIONS mode
8a700811 Add JSON Inspector example app
bbfc3f5c Fixed build on certain GCC toolchains
84b67fa6 Merge pull request microsoft#107 from baylesj/readme
90783ca4 Minor code style changes
3dd4482a Merge pull request microsoft#103 from wwriter/cond_schema_errormessage
ee4f85bf Minor tweaks to README.md file
a7038862 Update jsoncpp link in readme
abedaf0e Merge pull request microsoft#105 from baylesj/update-jsoncpp
825ee110 Fix readme
b6b6f167 Delete jsoncpp fuzzing stuff
2ee7474f Delete more unnecessary scripts
1ff5308f fix submodule
dbc4fcc8 Remove modules
88d9d890 Update JsonCpp to 1.9.4
d5091b2d added feature : now users can get a detailed error message when if-then-else conditional constraints are not met
931f64d4 Merge pull request microsoft#102 from mathbunnyru/patch-2
c5e61543 Add conan package manager info
6cda9227 Merge pull request microsoft#99 from mathbunnyru/patch-1
45b0f83b Fix README so the code actually throws, when json is invalid
89e37cbf Fix typo
7f01c391 Minor suggestions from clangtidy
a527564b Merge pull request microsoft#96 from joshuaeckroth/master
ccad6b14 Switched from jsoncpp deprecated Reader to CharReader
45a333e6 Try to make builds faster
0ee3bada Fix broken build
bbe62ecd Merge pull request microsoft#95 from wirenboard/feature/cache-regex
f7f3acf2 Merge pull request microsoft#94 from wirenboard/fix/pass-by-ref
39f35069 Regex objects cache for pattern constraints
2216c2b8 Pass visitor to validationCallback by ref
0db0d139 Merge pull request microsoft#93 from Delgan/fix-unused-args
1c825cc6 Remove unused parameters instead of commenting them out
ca031221 Fix compilation errors due to unused parameters
105e345a Merge pull request microsoft#92 from arthurafarias/add-cmake-interface-library
f60a3089 Added interface target to CMakeLists.txt
d453ee2e Revert breaking changes to jsoncpp_adapter.hpp
f3a0390e Revert changes to json11_adapter.hpp
49c20301 Disable -Wshadow for included header in property_tree_utils.hpp
8875d802 Add CLion paths to .gitignore
73a8e440 More aggressive compiler warnings
77d2ef82 Cosmetic improvements for poco_json_adapter.hpp and property_tree_adapter.hpp
e5c1cbfe Ensure tests are run for Poco, Qt and property_tree adapters
8c0d16a0 Cosmetic improvements for std_string_adapter.hpp, test_json_pointer.cpp and test_poly_constraint.cpp
217b990b Cosmetic improvements for schema_parser.hpp and validation_results.hpp
71f4cdaa Cosmetic improvements for custom_allocator.hpp
e46af245 Cosmetic improvements for concrete_constraints.hpp and basic_constraint.hpp
7917b2f7 Cosmetic improvements for schema.hpp, schema_parser.hpp and subschema.hpp
8150a520 Cosmetic improvements for test_adapter_comparison.cpp
28cc9e8e Cosmetic improvements for qtjson_adapter.hpp
508bc019 Cosmetic improvements for rapidjson_adapter.hpp
d7901d48 Cosmetics improvements for picojson_adapter.hpp
3211a04d Cosmetic improvements for nlohmann_json_adapter.hpp
0f57cb31 Cosmetic improvements for jsoncpp_adapter.hpp
e11c17c3 Cosmetic improvements for json11_adapter.hpp
6f1f4acb Cosmetic improvements for basic_adapter.hpp
3ddbe585 Cosmetic improvements for validation_visitor.hpp
09d21423 Update xcode project files
0481a0bb Minor tidy up of const auto usage
94cef2fa Add example showing local file resolution

git-subtree-dir: src/Valijson/valijson
git-subtree-split: 2dfc7499a31b84edef71189f4247919268ebc74e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants