From d1b30d2a515fb4bf152ddb66b285ac5a3d05ee6d Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sat, 19 Aug 2023 19:21:01 -0600 Subject: [PATCH] Upgrade System.CommandLine to latest version --- Colibri/Colibri.csproj | 2 +- Colibri/Program.cs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Colibri/Colibri.csproj b/Colibri/Colibri.csproj index 913e3e9..346c879 100644 --- a/Colibri/Colibri.csproj +++ b/Colibri/Colibri.csproj @@ -10,7 +10,7 @@ - + diff --git a/Colibri/Program.cs b/Colibri/Program.cs index c348368..9b457dd 100644 --- a/Colibri/Program.cs +++ b/Colibri/Program.cs @@ -1,5 +1,4 @@ using System.CommandLine; -using System.CommandLine.Invocation; using System.Reflection; using Antlr4.Runtime; using Colibri.Core; @@ -10,12 +9,14 @@ public class Program { public static int Main(string[] args) { + var fileOption = new Option("--file", "A Colibri Lisp file to execute."); + var rootCommand = new RootCommand("A modern Lisp-based language in .NET.") { - new Option("--file", "A Colibri Lisp file to execute."), + fileOption, }; - rootCommand.Handler = CommandHandler.Create(FileHandler); + rootCommand.SetHandler(FileHandler, fileOption); return rootCommand.Invoke(args); } @@ -157,8 +158,6 @@ private static void PrintException(Exception ex) private static void PrintSystemInfo() { Console.WriteLine($"Colibri Lisp v{typeof(Program).Assembly.GetCustomAttribute()?.InformationalVersion ?? "Unknown"}"); - - Console.WriteLine($".NET {Environment.Version}, {Environment.OSVersion}"); Console.WriteLine(); }