microsoft / microsoft/winget-cli
faulty default "install whatever matches the name" logic on partial name match
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
I was working on VSCode terminal and wanted to install a linux command. I wasn't sure if it exists but tried my luck believing it would throw an error on me.
Upon entering the install command, I got a prompt asking "Yes/No" to continue the installation, and here comes the problem: VSCode terminal has only about 1/3 of the screen and the description above the prompt was not good enough to stop me to believe it got what I wanted.
I confirmed only to regret it later when I see the full name of the package I allowed to be installed after it has downloaded a big file, and it was only when a Windows notification popped up.
I have checked the screen, and the name of the package was given 1-2 pages worth of scrolling away.
Every package manager I have used so far has nothing like this. If they can't find a full match, they are listing matching packages but then exit right away.
I have the fault to allow the installation without reading it whole, but you guys have the responsibility to prevent such occurrences because we are believers that developers would think about such behaviors before making it default.
Steps to reproduce
winget install tee
try this command in a VSCode terminal.
The name of the package is very far away from the prompt and all the printing causes a false sense of correctness.
Expected behavior
There are two expectation on such occasions:
- print matching package names AND exit. user should enter command again with the whole name
- the name of the package to be installed should appear just above the consent prompt, even if it is given somewhere else in the text above it.
Actual behavior
- The name of the package that has only partial match to its name, is given only "once" at the top of all scrolled text (and maybe in the description section)
- although it is a partial match, , the package is set to be installed.
Environment
``winget --info``
`
Windows Package Manager v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19044.2251
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing winget install tee in a VSCode terminal and inspect the package matching and consent-prompt flow. Done means a partial name match does not silently select a package, or the selected package name is shown immediately before the consent prompt.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100