Don't start up if no args passed in CLI mode (or only help arg)

This commit is contained in:
n00mkrad
2025-12-21 18:06:42 +01:00
parent 395bdf8151
commit eed7ba0c1f
3 changed files with 27 additions and 8 deletions

View File

@@ -40,9 +40,14 @@ namespace Flowframes
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
CmdMode = Paths.GetExe().EndsWith("Cmd.exe");
Cli.HandleCli();
Debug = Cli.Debug || System.Diagnostics.Debugger.IsAttached;
CmdMode = Paths.GetExe().EndsWith("Cmd.exe");
if(CmdMode && !Cli.CanStart)
{
Environment.Exit(0);
}
// Show splash screen
Application.EnableVisualStyles();