@@ -52,7 +52,7 @@ public static void main(String[] args) {
5252 }
5353 }
5454
55- if (args .length == 0 || (args . length == 1 && args [0 ].equalsIgnoreCase ("help" ))) {
55+ if (args .length == 0 || (args [0 ].equalsIgnoreCase ("help" ))) {
5656 System .out .println ("Options:" );
5757 System .out .println (" help - displays this message" );
5858 System .out .println (" init - decompiles 1.8.8 and applies the main repo's patch files" );
@@ -64,7 +64,7 @@ public static void main(String[] args) {
6464 System .out .println (" merge_direct - merges changes in the dev workspace with the repo's main patch files" );
6565 System .out .println (" clean - delete init and pullrequest directories, keeps dev workspace" );
6666 System .out .println ();
67- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("init" )) {
67+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("init" )) {
6868 LicensePrompt .display ();
6969 System .out .println ("Running task '" + args [0 ] + "':" );
7070 System .out .println ();
@@ -77,7 +77,7 @@ public static void main(String[] args) {
7777 System .err .println ("Task Failed!" );
7878 System .err .println ();
7979 }
80- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("workspace" )) {
80+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("workspace" )) {
8181 System .out .println ("Running task '" + args [0 ] + "':" );
8282 System .out .println ();
8383 if (SetupWorkspace .setupWorkspace ()) {
@@ -89,7 +89,7 @@ public static void main(String[] args) {
8989 System .err .println ("Task Failed!" );
9090 System .err .println ();
9191 }
92- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("pullrequest" )) {
92+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("pullrequest" )) {
9393 System .out .println ("Running task '" + args [0 ] + "':" );
9494 System .out .println ();
9595 if (PullRequestTask .pullRequest ()) {
@@ -101,7 +101,7 @@ public static void main(String[] args) {
101101 System .err .println ("Task Failed!" );
102102 System .err .println ();
103103 }
104- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("pullrequest_test" )) {
104+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("pullrequest_test" )) {
105105 System .out .println ("Running task '" + args [0 ] + "':" );
106106 System .out .println ();
107107 if (SetupWorkspace .pullRequestTest ()) {
@@ -113,7 +113,7 @@ public static void main(String[] args) {
113113 System .err .println ("Task Failed!" );
114114 System .err .println ();
115115 }
116- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("unpatched" )) {
116+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("unpatched" )) {
117117 System .out .println ("Running task '" + args [0 ] + "':" );
118118 System .out .println ();
119119 if (CreateUnpatched .createUnpatched ()) {
@@ -125,7 +125,7 @@ public static void main(String[] args) {
125125 System .err .println ("Task Failed!" );
126126 System .err .println ();
127127 }
128- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("merge" )) {
128+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("merge" )) {
129129 System .out .println ("Running task '" + args [0 ] + "':" );
130130 System .out .println ();
131131 if (MergePullRequest .mergeTask ()) {
@@ -137,7 +137,7 @@ public static void main(String[] args) {
137137 System .err .println ("Task Failed!" );
138138 System .err .println ();
139139 }
140- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("merge_direct" )) {
140+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("merge_direct" )) {
141141 System .out .println ("Running task '" + args [0 ] + "':" );
142142 System .out .println ();
143143 if (MergePullRequest .mergeDirect ()) {
@@ -149,7 +149,7 @@ public static void main(String[] args) {
149149 System .err .println ("Task Failed!" );
150150 System .err .println ();
151151 }
152- }else if (args .length == 1 && args [0 ].equalsIgnoreCase ("clean" )) {
152+ }else if (args .length > 0 && args [0 ].equalsIgnoreCase ("clean" )) {
153153 System .out .println ("Running task '" + args [0 ] + "':" );
154154 System .out .println ();
155155 if (TaskClean .taskClean ()) {
0 commit comments