JAL-4059 New namespaced query string parameters.
[jalview.git] / src / jalview / bin / Jalview.java
index e343b0f..3ffcdd0 100755 (executable)
@@ -837,36 +837,40 @@ public class Jalview implements JalviewObjectI
     }
 
     // Run Commands from cli
-    cmds = new Commands(argparser, headlessArg);
-    cmds.processArgs();
-    boolean commandsSuccess = cmds.argsWereParsed();
-
-    if (commandsSuccess)
+    boolean commandsSuccess = false;
+    if (!(argparser.isMixedStyle() || argparser.isOldStyle()))
     {
-      if (headlessArg)
+      cmds = new Commands(argparser, headlessArg);
+      cmds.processArgs();
+      commandsSuccess = cmds.argsWereParsed();
+
+      if (commandsSuccess)
       {
-        if (argparser.getBoolean(Arg.NOQUIT))
+        if (headlessArg)
         {
-          Console.warn(
-                  "Completed " + Arg.HEADLESS.getName() + " commands, but "
-                          + Arg.NOQUIT + " is set so not quitting!");
-        }
-        else
-        {
-          Jalview.exit("Successfully completed commands in headless mode",
-                  ExitCode.OK);
+          if (argparser.getBoolean(Arg.NOQUIT))
+          {
+            Console.warn("Completed " + Arg.HEADLESS.getName()
+                    + " commands, but " + Arg.NOQUIT
+                    + " is set so not quitting!");
+          }
+          else
+          {
+            Jalview.exit("Successfully completed commands in headless mode",
+                    ExitCode.OK);
+          }
         }
+        Console.info("Successfully completed commands");
       }
-      Console.info("Successfully completed commands");
-    }
-    else
-    {
-      if (headlessArg)
+      else
       {
-        Jalview.exit("Error when running Commands in headless mode",
-                ExitCode.ERROR_RUNNING_COMMANDS);
+        if (headlessArg)
+        {
+          Jalview.exit("Error when running Commands in headless mode",
+                  ExitCode.ERROR_RUNNING_COMMANDS);
+        }
+        Console.warn("Error when running commands");
       }
-      Console.warn("Error when running commands");
     }
 
     // Check if JVM and compile version might cause problems and log if it