Skip to content

Commit

Permalink
Add a --version switch
Browse files Browse the repository at this point in the history
  • Loading branch information
mkestler-rtp committed Feb 7, 2023
1 parent e392601 commit a241c51
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions DotNETDepends/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ static async Task Main(string[] args)
{
if (args.Length == 1 && File.Exists(args[0]))
{
if ("--version".Equals(args[0]))
{
PrintVersion();
Environment.Exit(0);
return;
}
if (!ValidateFileNameInput(args[0]))
{
throw new Exception("Invalid command line argument.");
Expand Down Expand Up @@ -52,8 +58,12 @@ static async Task Main(string[] args)
}

}

private static bool validateFileNameInput(string v)
private static void PrintVersion()
{
//!!When you change this version be sure to update the expected version in dot-net.ts in the codesee repo!!
Console.WriteLine("0.1.0");
}
private static bool ValidateFileNameInput(string v)
{
throw new NotImplementedException();
}
Expand Down

0 comments on commit a241c51

Please sign in to comment.