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

Show subcommand help instead of main dotnet nuget trust command help for all cases #10788

Closed
erdembayar opened this issue Apr 21, 2021 · 3 comments · Fixed by NuGet/NuGet.Client#4211
Assignees
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Area:Logging Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:dotnet.exe Type:Feature

Comments

@erdembayar
Copy link
Contributor

erdembayar commented Apr 21, 2021

Details about Problem

NuGet product used (dotnet.exe):

Product version:

Worked before? If so, with which NuGet version: N/A

Repro steps and/or sample project

Printing out help doesn't help at all unless the error itself has to do with a command, argument, or option being invalid.
Current experience show help for dotnet nuget is different from nuget.exe. It show help when there is a exception like InvalidOperationException even though it's nothing to do with a command, argument, or option being invalid

For example:
image.png

It adds red marked help even though it's not really needed.
image.png

Verbose Logs

@erdembayar erdembayar added Area:ErrorHandling warnings and errors/log messages & related error codes. Product:dotnet.exe Type:Bug labels Apr 21, 2021
@aortiz-msft aortiz-msft added the Priority:2 Issues for the current backlog. label Apr 22, 2021
@aortiz-msft
Copy link
Contributor

Not a blocking issue for the new command, but something we'd like to improve shortly afterwards.

@erdembayar
Copy link
Contributor Author

erdembayar commented Apr 24, 2021

NuGet/NuGet.Client#3989 (comment)
NuGet/NuGet.Client#3989 (comment)
Registering sub-commands improves error handling, reading values for options/arguments instead of searching strings which can be error prone if not done right, help messages

@erdembayar
Copy link
Contributor Author

erdembayar commented Apr 24, 2021

nuget59 trusted-signers add .\newtonsoft.json.13.0.1-beta1.nupkg -Name NewtonAuthor333 -Author -config ..\nuget.config -AllowUntrustedRoot
dotnet nuget trust author NewtonAuthor333 .\newtonsoft.json.13.0.1-beta1.nupkg --configfile ..\nuget.config --allow-untrusted-root

@erdembayar erdembayar added this to the Sprint 2021-08 milestone Aug 2, 2021
@erdembayar erdembayar added the Category:Quality Week Issues that should be considered for quality week label Sep 27, 2021
@kartheekp-ms kartheekp-ms changed the title Show help only for the error itself has to do with a command, argument, or option being invalid with dotnet nuget command show subcommand help instead of main dotnet nuget trust command help for all cases Feb 17, 2022
@kartheekp-ms kartheekp-ms changed the title show subcommand help instead of main dotnet nuget trust command help for all cases Show subcommand help instead of main dotnet nuget trust command help for all cases Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Area:Logging Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:dotnet.exe Type:Feature
Projects
None yet
3 participants