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

Migrate config command to System.CommandLine #5549

Merged
merged 15 commits into from
Jan 11, 2024

Conversation

martinrrm
Copy link
Contributor

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

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@martinrrm martinrrm requested a review from a team as a code owner December 19, 2023 20:27
@ghost ghost added the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Dec 27, 2023
@ghost
Copy link

ghost commented Dec 27, 2023

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.

@ghost ghost removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Dec 30, 2023
@martinrrm martinrrm requested a review from zivkan January 2, 2024 17:27
nkolev92
nkolev92 previously approved these changes Jan 5, 2024
Nigusu-Allehu
Nigusu-Allehu previously approved these changes Jan 5, 2024
Base automatically changed from dev-feature-migrate-systemcommandline to dev January 9, 2024 18:09
@jeffkl jeffkl dismissed stale reviews from Nigusu-Allehu and nkolev92 January 9, 2024 18:09

The base branch was changed.

@martinrrm martinrrm force-pushed the dev-feature-migrate-dotnet-nuget-config branch from cb550f3 to 813517b Compare January 9, 2024 23:46
@@ -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"))
Copy link
Member

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.

@martinrrm martinrrm merged commit 7a06d4b into dev Jan 11, 2024
15 of 16 checks passed
@martinrrm martinrrm deleted the dev-feature-migrate-dotnet-nuget-config branch January 11, 2024 18:11
@nkolev92
Copy link
Member

We never documented this feature.

There's no documentation issue that I could find. I created: NuGet/Home#13398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants