Skip to content

dotnet nuget why test reports missing argument when only path provided - #6218

Merged
jeffkl merged 1 commit into
NuGet:devfrom
zivkan:dev-zivkan-dotnet-nuget-why-path-only
Jan 14, 2025
Merged

jeffkl merged 1 commit into
NuGet:devfrom
zivkan:dev-zivkan-dotnet-nuget-why-path-only

Conversation

@zivkan

@zivkan zivkan commented Jan 10, 2025 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14030

Description

When dotnet nuget why only gets a single argument, check if the argument matches a file or directory name, and if so, use it as the path, rather than a package id. This allows System.CommandLine to correctly output a "required argument missing" error.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc. n/a

@zivkan
zivkan requested a review from a team as a code owner January 10, 2025 06:15
@zivkan zivkan changed the title Fix dotnet nuget why test when only path provided dotnet nuget why test reports missing argument when only path provided Jan 10, 2025
@jeffkl
jeffkl merged commit 1366517 into NuGet:dev Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet nuget why does not give an error if only a project path was specified

5 participants