public Task StartAsync(CancellationToken cancellationToken) { try { gitVersionExecutor.Execute(arguments); } catch (Exception exception) { Console.Error.WriteLine(exception.Message); } applicationLifetime.StopApplication(); return(Task.CompletedTask); }
public Task StartAsync(CancellationToken cancellationToken) { try { var arguments = options.Value; log.Verbosity = arguments.Verbosity; System.Environment.ExitCode = gitVersionExecutor.Execute(arguments); } catch (Exception exception) { Console.Error.WriteLine(exception.Message); System.Environment.ExitCode = 1; } applicationLifetime.StopApplication(); return(Task.CompletedTask); }