-
Notifications
You must be signed in to change notification settings - Fork 676
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
Migrate config command to System.CommandLine #5549
Conversation
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
src/NuGet.Core/NuGet.CommandLine.XPlat/Commands/ConfigCommands/ConfigCommand.cs
Outdated
Show resolved
Hide resolved
The base branch was changed.
Added DotNet Nuget Config Paths command
Adds NuGet config get command
Added Dotnet NuGet config unset command
Adds Dotnet NuGet config set command
cb550f3
to
813517b
Compare
@@ -74,7 +74,7 @@ public static int MainInternal(string[] args, CommandOutputLogger log) | |||
|
|||
NuGet.Common.Migrations.MigrationRunner.Run(); | |||
|
|||
if (args.Count() >= 2 && args[0] == "package" && args[1] == "search") | |||
if ((args.Count() >= 2 && args[0] == "package" && args[1] == "search") || (args.Any() && args[0] == "config")) |
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.
We should be using length > 0 in all of these.
Perf isn't critical here, but it's good to be in the habit of using the performant option.
We never documented this feature. There's no documentation issue that I could find. I created: NuGet/Home#13398 |
Bug
Fixes: NuGet/Home#12686
Regression? Last working version:
Description
This PR changes the config command to use the package System.CommandLine.
This PR also includes the implementation of the commands since they were never merged to dev, Program.cs and ConfigCommand.cs are the actual changes related to the migration.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation