build: initial project release
Some checks failed
default / dotnet-default-workflow (push) Failing after 54s
Some checks failed
default / dotnet-default-workflow (push) Failing after 54s
This commit is contained in:
commit
1e4687aff6
59 changed files with 4902 additions and 0 deletions
21
src/process.dummy.app/_commands/ExitCommand.cs
Normal file
21
src/process.dummy.app/_commands/ExitCommand.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
using Spectre.Console.Cli;
|
||||
|
||||
internal sealed class ExitCommand : AsyncCommand<ExitCommand.Settings>
|
||||
{
|
||||
public sealed class Settings : CommandSettings
|
||||
{
|
||||
[CommandArgument(1, "<code>")] public int Code { get; init; }
|
||||
}
|
||||
|
||||
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken)
|
||||
{
|
||||
using var output = Output.Connect();
|
||||
|
||||
await output.Stderr.WriteLineAsync($"Exit code set to {settings.Code}");
|
||||
|
||||
return settings.Code;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue