Passing the --help flag raises the help information but incorrectly dumps out a stack trace not handling RaiseHelpException:
USAGE: NeoAgi.AWS.CodeArtifact.Pruner v1.0.1.0
NeoAgi, LLC - 2021 NeoAgi, LLC
Options:
-c, --cacheLocation | Cache Location - Directory to hold for local cache. (optional)
-ll, --loglevel | Logging Level - Minimum Logging Level to emit. Availabile options are None, Trace, Debug, Information, Warning, Error, Critical. Default is Information. (optional)
-ttl, --cacheTtl | Cache TTL - Number of hours to consider the Cache Location valid for. Default is 8 hours. Set to 0 to delete cache. (optional)
-a, --account | AWS Account ID - AWS Account ID to use. Only necessary if domain and namespace are not unique to the principal provided. (optional)
-d, --domain | Artifact Domain - AWS Artifact Domain to query with.
-r, --repository | Artifact Repository - AWS Artifact Repository to query with.
-t, --threads | Concurrency Maximum Limit - Maximum threads that will be used for background tasks. Set to 0 to assume Processor Count - 1. (optional)
-p, --pageLimit | Page Limit - Maximum number of pages to return from AWS Calls. Default to 50 pages, or about 2,500 packages. (optional)
-i, --checkpointInterval | Checkpoint Interval - Number of items processed before a checkpoint information log is emitted. Set to 0 to disable. (optional)
-dr, --dry-run | Dry Run - If set to true, all logs will report as if changed occurred yet no modifications will be made. Default is false. (optional)
Unhandled exception. NeoAgi.CommandLine.Exceptions.RaiseHelpException: Error in the application.
at NeoAgi.CommandLine.OptionManager.Parse(String[] arr)
at NeoAgi.CommandLine.GetOpsExtension.FlattenOpts[T](String[] args, String keyPrefix, TextWriter output)
at NeoAgi.CommandLine.Extensions.Configuration.OptsConfigurationProvider`1.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Microsoft.Extensions.Hosting.HostBuilder.InitializeAppConfiguration()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Program.Main(String[] args) in C:\Users\robby\projects\NeoAgi.AWS.CodeArtifact.Pruner\NeoAgi.AWS.CodeArtifact.Pruner\Program.cs:line 22
Passing the
--help
flag raises the help information but incorrectly dumps out a stack trace not handlingRaiseHelpException
: