All checks were successful
Run the JSON parser tests / test (push) Has been skipped
21 lines
640 B
C#
21 lines
640 B
C#
using System.CommandLine.Builder;
|
|
using System.CommandLine.Parsing;
|
|
using Jtr.Tools.CLI;
|
|
|
|
var parser = new CommandLineBuilder(new RootCommand())
|
|
.UseDefaults()
|
|
.UseExceptionHandler((ex, ctx) =>
|
|
{
|
|
/*
|
|
* Use a custom ExceptionHandler to prevent the System.CommandLine library from printing the StackTrace by default.
|
|
*/
|
|
Console.WriteLine(ex.Message);
|
|
|
|
/*
|
|
* Set the exit code to a non-zero value to indicate to the shell that the process has failed.
|
|
*/
|
|
Environment.ExitCode = -1;
|
|
})
|
|
.Build();
|
|
|
|
await parser.InvokeAsync(args); |