- Notifications
You must be signed in to change notification settings - Fork1.2k
Add SetAction to dotnet nuget trust subcommands#52224
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR fixes a critical bug introduced in a previous refactoring (#51624) where theSetAction call was missing for alldotnet nuget trust subcommands (author, repository, source, certificate, remove, sync, and list). Without this action registration, the trust subcommands would fail to execute properly at runtime.
Key Changes:
- Restores the
SetAction(NuGetCommand.Run)call within the foreach loop that iterates over trust subcommands
tmat left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is not a correct fix. The command definition shouldn't set actions. That should be done inNuGetCommandParser.SetAction. The bug is that it doesn't do it recursively.
BTW, are there no tests covering this command?
martinrrm commentedDec 16, 2025
@tmat Pushed a change to do it recursively, and at the moment we don't have tests for this and other commands in this repo. We found this bug when our CI tests started failing. |
martinrrm commentedDec 17, 2025
@tmat Tests passed, can we merge this? I just realized the PR is pointing main, is that the correct branch? |
tmat commentedDec 17, 2025
Good catch - it should go to release/10.0.2xx. Please rebase. |
Fixes:#52220
In a previous refactoring PR#51624, there was a missing SetAction to dotnet nuget trust subcommands that broke them.