We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79c899e commit e895f8bCopy full SHA for e895f8b
1 file changed
src/Program.cs
@@ -1,5 +1,7 @@
1
using System.CommandLine;
2
+using System.CommandLine.Builder;
3
using System.CommandLine.Invocation;
4
+using System.CommandLine.Parsing;
5
using LineCount;
6
using LineCount.Logging;
7
@@ -84,4 +86,10 @@
84
86
);
85
87
});
88
-return await rootCommand.InvokeAsync(args);
89
+CommandLineBuilder builder = new CommandLineBuilder(rootCommand)
90
+ .UseVersionOption("--version", "-v")
91
+ .UseDefaults();
92
+
93
+var parser = builder.Build();
94
95
+return await parser.InvokeAsync(args);
0 commit comments