Skip to content

Commit 7c9d094

Browse files
committed
Bugfix - -help flag ignored if source code path is unspecified
1 parent e970419 commit 7c9d094

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/java/com/denimgroup/threadfix/cli/endpoints/EndpointMain.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ private static boolean checkArguments(String[] args) {
288288
return false;
289289
}
290290

291+
for (String arg : args) {
292+
if (arg.equals("-help")) {
293+
printHelp();
294+
System.exit(0);
295+
}
296+
}
297+
291298
File rootFile = new File(args[0]);
292299

293300
if (rootFile.exists() && rootFile.isDirectory() || args[0].startsWith("-path-list-file")) {
@@ -360,9 +367,6 @@ private static boolean checkArguments(String[] args) {
360367
}
361368
}
362369
}
363-
} else if (arg.equalsIgnoreCase("-help")) {
364-
printHelp();
365-
System.exit(0);
366370
} else {
367371
println("Received unsupported option " + arg + ", run with -help to see available flags.");
368372
return false;

0 commit comments

Comments
 (0)