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

Issues when more than one package exist for winget install (ambigous names) #478

Closed
Karl-WE opened this issue Jul 4, 2020 · 12 comments
Closed
Labels
Resolution-Duplicate Issue is a duplicate
Milestone

Comments

@Karl-WE
Copy link
Contributor

Karl-WE commented Jul 4, 2020

-->

ambigous software packages won't install is -v is specified. Here PowerShell 7.x

Steps to reproduce

open Powershell 5.1/ 7.x or Terminal
winget install Powershell
Output: 2 possible products tagged as powershell the correct install name would be Microsoft.Powershell and ...Powershell-Preview
Specifying the full ID give same list
Specifying -v 7.0.2
still will not install PowerShell 7.0.2 via winget but throws 2 possible packages still

Expected behavior

issueing
winget install powershell -v 7.0.2 should install PowerShell
winget install Microsoft.Powershell -v 7.0.2 should install PowerShell

same with preview tags, ID and version

Actual behavior

just outputs 2 versions are available no selection, installation possible.
image

Environment

[winget --info]
Windows Package Manager version: v1.0.41331.0
Windows: 20161.1000 and earlier
Package: : 1.0.41331.0


@ghost ghost added the Needs-Triage Issue need to be triaged label Jul 4, 2020
@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 4, 2020

I now understand that -v / --version is to fetch and display the version of the tool winget.
I'd rather would use this to specify a version for installation (or later uninstall)

@tommck
Copy link

tommck commented Jul 6, 2020

What exactly is one supposed to do here?

PS C:\dev> winget install Microsoft.Powershell
Multiple apps found matching input criteria. Please refine the input.
Name               Id                           Version
---------------------------------------------------------------
PowerShell-Preview Microsoft.PowerShell-Preview 7.1.0-preview.3
PowerShell         Microsoft.PowerShell         7.0.2

I see no way to pare this down to anymore

@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 6, 2020

@tommck are you asking me?

@tommck
Copy link

tommck commented Jul 6, 2020

@tommck are you asking me?

No, was mostly ranting in support of you :)

Turns out you have to use -e, like:

PS C:\dev> winget install -e Microsoft.PowerShell

@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 6, 2020

@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 6, 2020

as said -v is more logical to pick a version and -v is a duplicate of --info.
for --info there is no -i command

Team, you're going the same path as for Terminal lads remote related design question / issue
microsoft/terminal#4632 (comment)

@megamorf
Copy link

megamorf commented Jul 6, 2020

@Karl-WE You seem to be new to command line programs. winget supports a number of subcommands (install, show, search, etc.). If you pass the -? to one of those you'll see the additional options for those subcommands. You would've also seen that had you checked the online documentation.

To install a version other than latest you use:

# winget install --exact <id> --version <version number>

winget install Microsoft.dotnet --version 3.1.301 --exact
Found .NET Core [Microsoft.dotnet]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.visualstudio.microsoft.com/download/pr/4e88f517-196e-4b17-a40c-2692c689661d/eed3f5fca28262f764d8b650585a7278/dotnet-sdk-3.1.301-win-x64.exe
  ██████████████████████████████   124 MB /  124 MB
Successfully verified installer hash
Installing ...
Successfully installed!

@megamorf
Copy link

megamorf commented Jul 6, 2020

@denelon This is a duplicate of #292

@Karl-WE
Copy link
Contributor Author

Karl-WE commented Jul 6, 2020

@megamorf I am not new to this megamorf.

winget --version will output the version of the tool
image

Given the logic that you can enter -? at any level reminds me much of Cisco IOS and speaking for Windows

  • fsutil
  • netsh
  • dism

but it is not overly very common in Windows to have the ability to specify /? any time with the previous level of commands. Some have it some have not.

Thanks for giving me the idea winget would favour this. Powershell does not offer a context sensitive help, quite unfortunately.

Before this dupe is entirely wasted time, please let us have a PR to make the winget ? more pointing out to this.

Still I see a inconsistency with the commandline options, we might discuss this in a new bug / feature request:

example

winget ? = help (fallback)
winget /? = help (fallback)
winget -? = help
winget --? = help

next level:
winget install ? or winget install /?
"no matching criteria"

winget install --? works
winget install -? works

Albeit help says:
Wenn Sie weitere Details zu einem bestimmten Befehl erfahren möchten, übergeben Sie ihm das Hilfe-Argument. [-?]

I would rather see it here

Die folgenden Optionen stehen zur Verfügung:
-v,--version Version des Tools anzeigen
--info Allgemeine Informationen zum Tool anzeigen
-?, --? kontextsensitive Hilfe.
Wenn Sie weitere Details zu einem bestimmten Befehl erfahren möchten,
übergeben Sie ihm das Hilfe-Argument

Mind we are still on Windows, and -- commandlines are not common here. For a new tool like winget, which I see a bright future and major positive impact, we should not be dev-oriented but user oriented striving for consistency and clear and concise UX without reading docs, eventually with command lines everything should to work /? or ? see also, I refrain, microsoft/terminal#4632 (comment)
Otherwise winget is a Linux User friendly command line tool, but not so Windows user friendly.

IF we want to drop /? in favour for -? or --? or even ? I am absolutely ok with that

Then please leave a remark when winget /? is issued "please use -? or --? for help"

@denelon
Copy link
Contributor

denelon commented Jul 7, 2020

@Karl-WE the issue as posted looks like a duplicate of #292 as @megamorf commented. I think the issue as you've elaborated now looks more like a new request to either make aliases for other forms of "?" or to provide hints when one is used. I don't believe we have an Issue for that feature.

@denelon
Copy link
Contributor

denelon commented Jul 7, 2020

Duplicate of #292

@denelon denelon marked this as a duplicate of #292 Jul 7, 2020
@ghost
Copy link

ghost commented Jul 7, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jul 7, 2020
@ghost ghost added Resolution-Duplicate Issue is a duplicate and removed Needs-Triage Issue need to be triaged labels Jul 7, 2020
@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate Issue is a duplicate
Projects
None yet
Development

No branches or pull requests

4 participants