mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
19 lines
474 B
C#
19 lines
474 B
C#
using System.Threading.Tasks;
|
|
using CliFx.Attributes;
|
|
using CliFx.Infrastructure;
|
|
|
|
namespace CliFx.Tests.Dummy.Commands;
|
|
|
|
[Command("env-test")]
|
|
public class EnvironmentTestCommand : ICommand
|
|
{
|
|
[CommandOption("target", EnvironmentVariable = "ENV_TARGET")]
|
|
public string GreetingTarget { get; init; } = "World";
|
|
|
|
public ValueTask ExecuteAsync(IConsole console)
|
|
{
|
|
console.Output.WriteLine($"Hello {GreetingTarget}!");
|
|
|
|
return default;
|
|
}
|
|
} |