audit, advisories and doctors/setup work

This commit is contained in:
master
2026-01-13 18:53:39 +02:00
parent 9ca7cb183e
commit d7be6ba34b
811 changed files with 54242 additions and 4056 deletions

View File

@@ -10,13 +10,27 @@ public static class PolicySimulationSmokeApp
var root = PolicySimulationSmokeCommand.Build(runner);
var parseResult = root.Parse(args, new ParserConfiguration());
var invocationConfiguration = new InvocationConfiguration();
if (parseResult.Errors.Count > 0)
using var cancellationSource = new CancellationTokenSource();
ConsoleCancelEventHandler? handler = (_, e) =>
{
await parseResult.InvokeAsync(invocationConfiguration, CancellationToken.None);
return 64; // EX_USAGE
}
e.Cancel = true;
cancellationSource.Cancel();
};
Console.CancelKeyPress += handler;
return await parseResult.InvokeAsync(invocationConfiguration, CancellationToken.None);
try
{
if (parseResult.Errors.Count > 0)
{
await parseResult.InvokeAsync(invocationConfiguration, cancellationSource.Token);
return 64; // EX_USAGE
}
return await parseResult.InvokeAsync(invocationConfiguration, cancellationSource.Token);
}
finally
{
Console.CancelKeyPress -= handler;
}
}
}