Merge branch 'improvement/JAL-4262_deprecation_warning_when_old_CLI_arguments_are_pro...
[jalview.git] / src / jalview / bin / Commands.java
index cd72e60..e6c7b54 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Map;
 
 import jalview.analysis.AlignmentUtils;
 import jalview.api.structures.JalviewStructureDisplayI;
+import jalview.bin.Jalview.ExitCode;
 import jalview.bin.argparser.Arg;
 import jalview.bin.argparser.ArgParser;
 import jalview.bin.argparser.ArgParser.Position;
@@ -161,7 +162,9 @@ public class Commands
 
     if (argParser.getBoolean(Arg.QUIT))
     {
-      Jalview.exit("Exiting due to " + Arg.QUIT.argString(), 0);
+      Jalview.getInstance().exit(
+              "Exiting due to " + Arg.QUIT.argString() + " argument.",
+              ExitCode.OK);
       return true;
     }
     // carry on with jalview.bin.Jalview
@@ -441,7 +444,8 @@ public class Commands
       {
         if (headless)
         {
-          Jalview.exit("Could not open any files in headless mode", 1);
+          Jalview.exit("Could not open any files in headless mode",
+                  ExitCode.NO_FILES);
         }
         else
         {