Skip to content

Don't validate when showing information #32

@TAGC

Description

@TAGC

I'm trying to create a command line application with a single required argument ("version"):

var versionArgument = app.Argument("version", "The version to set the project as.").IsRequired();

As expected, I get an error message when trying to run my program without specifying this argument:

$ dotnet bin/Release/netcoreapp2.0/dotnet-setversion.dll
The version field is required.
Specify --help for a list of available options and commands.

However, I don't expect to get this error when displaying information (help or version), but that's what currently happens:

$ dotnet bin/Release/netcoreapp2.0/dotnet-setversion.dll --help
Usage: dotnet-setversion [arguments] [options]

Arguments:
  version  The version to set the project as.

Options:
  -h|--help  Show help information
  -f|--file  Identifies the csproj file to update. Looks in the current working directory if not set.
The version field is required.
Specify --help for a list of available options and commands.

Metadata

Metadata

Assignees

Labels

bugclosed-resolvedThis issue is closed because the work done to resolve it is complete.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions