Repository: flex-utilities
Updated Branches:
  refs/heads/develop 618ae2c7c -> fe3b8b260


- Fixed the handling of the "help" command.


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/a7e26306
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/a7e26306
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/a7e26306

Branch: refs/heads/develop
Commit: a7e263066851a812e2c2cb705592ac5483faff57
Parents: 55f0ba1
Author: Christofer Dutz <christofer.d...@codecentric.de>
Authored: Sat Apr 11 09:43:39 2015 +0200
Committer: Christofer Dutz <christofer.d...@codecentric.de>
Committed: Sat Apr 11 09:43:39 2015 +0200

----------------------------------------------------------------------
 .../flex/utilities/converter/core/SdkConverterCLI.java      | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/a7e26306/mavenizer/cli/src/main/java/org/apache/flex/utilities/converter/core/SdkConverterCLI.java
----------------------------------------------------------------------
diff --git 
a/mavenizer/cli/src/main/java/org/apache/flex/utilities/converter/core/SdkConverterCLI.java
 
b/mavenizer/cli/src/main/java/org/apache/flex/utilities/converter/core/SdkConverterCLI.java
index 0f088e6..56d5f1f 100644
--- 
a/mavenizer/cli/src/main/java/org/apache/flex/utilities/converter/core/SdkConverterCLI.java
+++ 
b/mavenizer/cli/src/main/java/org/apache/flex/utilities/converter/core/SdkConverterCLI.java
@@ -22,6 +22,7 @@ import java.util.*;
  */
 public class SdkConverterCLI {
 
+    public static final String COMMAND_HELP = "help";
     public static final String COMMAND_LIST = "list";
     public static final String COMMAND_DOWNLOAD = "download";
     public static final String COMMAND_CONVERT = "convert";
@@ -106,8 +107,9 @@ public class SdkConverterCLI {
         CommandLineParser parser = new BasicParser();
         try {
             CommandLine cmd = parser.parse(options, args);
-            if(cmd.getArgList().isEmpty() || 
cmd.getArgList().contains("help")) {
+            if(cmd.getArgList().isEmpty() || 
cmd.getArgList().contains(COMMAND_HELP)) {
                 printHelp(options);
+                System.exit(0);
             }
 
             // Find out the desired platform(s).
@@ -190,11 +192,6 @@ public class SdkConverterCLI {
             // Exectute operations
             
////////////////////////////////////////////////////////////////////////////
 
-            // Print the help screen.
-            if(cmd.getArgList().contains("help")) {
-                printHelp(options);
-            }
-
             // Output a list of all available downloads.
             if(cmd.getArgList().contains(COMMAND_LIST)) {
                 
System.out.println("-----------------------------------------------");

Reply via email to