Skip to content

Commit

Permalink
Update src/dotnet_mytool/Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
gitauto-ai[bot] authored Nov 18, 2024
1 parent 0e57363 commit ec7033f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/dotnet_mytool/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.CommandLine;

namespace DotNetMyTool
{
class Program
{
static int Main(string[] args)
{
var rootCommand = new RootCommand();

var setEnvCommand = new Command("set-env", "Set an environment variable")
{
new Argument<string>("variable", "The environment variable in the format VAR_NAME=value"),
new Option<string>("--target", () => "User", "The target scope: User or Machine")
};

rootCommand.AddCommand(setEnvCommand);

return rootCommand.InvokeAsync(args).Result;
}
}
}

0 comments on commit ec7033f

Please sign in to comment.