Fix behaviour for default help
MODIFY
WalletWasabi.Gui/CommandLine/CommandInterpreter.cs
WalletWasabi.Gui/CommandLine/CommandInterpreter.cs
@@ -7,11 +7,16 @@ namespace WalletWasabi.Gui.CommandLine
{
public static class CommandInterpreter
{
- public static void ExecuteCommands(string[] args)
+ public static bool ExecuteCommands(string[] args)
{
var showHelp = false;
var showVersion = false;
+ if(args.Length == 0)
+ {
+ return true;
+ }
+
try
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -34,22 +39,26 @@ namespace WalletWasabi.Gui.CommandLine
new PasswordFinderCommand()
};
- suite.Run(args);
+ if(suite.Run(args) == 0)
+ {
+ return false;
+ }
if (showHelp)
{
ShowHelp(options);
- return;
+ return false;
}
else if (showVersion)
{
ShowVersion();
- return;
+ return false;
}
}
finally
{
Native.DettachParentConsole();
}
+ return true;
}
private static void ShowVersion()

MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -27,9 +27,9 @@ namespace WalletWasabi.Gui
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
- if(args.Length > 0)
+ if(!CommandInterpreter.ExecuteCommands(args))
{
- CommandInterpreter.ExecuteCommands(args);
+ return;
}
BuildAvaloniaApp()

Fix behaviour for default help