-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
30 lines (22 loc) · 718 Bytes
/
Copy pathProgram.cs
File metadata and controls
30 lines (22 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Spectre.Console.Cli;
using Spectre.Console;
using IER.Cli;
using IER.Version;
bool CheckForUpdateOnStart = false;
VersionControl.FetchAssemblyInformation();
if (CheckForUpdateOnStart) await VersionControl.FetchOnlineVersionTag(); await ProgramUI.WriteUpdateCheck(onlyDisplayOutdated: true);
var app = new CommandApp<ProgramCommand>();
app.Configure(config =>
{
config.SetApplicationName(VersionControl.AppName);
config.SetApplicationVersion(VersionControl.VersionTag);
});
int exitCode = app.Run(args);
// On bad argument error
if (exitCode == -2)
{
app.Run(["--help"]);
AnsiConsole.MarkupLine("[red]Error:[/] Missing required argument 'ArchivePath'");
return 0;
}
return exitCode;