in src/ado2gh/Program.cs [34:52]
private static Parser BuildParser(ServiceProvider serviceProvider)
{
var root = new RootCommand("Automate end-to-end Azure DevOps Repos to GitHub migrations.");
var commandLineBuilder = new CommandLineBuilder(root);
foreach (var command in serviceProvider.GetServices<Command>())
{
commandLineBuilder.AddCommand(command);
}
return commandLineBuilder
.UseDefaults()
.UseExceptionHandler((ex, _) =>
{
Logger.LogError(ex);
Environment.ExitCode = 1;
}, 1)
.Build();
}