Describe the bug
Audit tool throws an unhandled exception when an unknown flag is given.
To Reproduce
Launch audit-tool with the --help flag:
$ audit-tool --help
You will see a warning about an unknown flag, the standard usage output (as if audit-tool was given with no arguments), but then you'll see an unhandled exception (see Screenshots below)
Expected behavior
Don't display the unhandled exception, exit with return code 0
Screenshots
This shows the existing behavior
ERROR Failed to parse Unrecognized option: --help
usage: audit-tool [options] { - | Directory,Directory,Directory}
where:
- read folders from standard input
Directory .... is a list of directories separated by
whitespace
[options] are:
-d,--debug Show debugging information
-i,--inputFile <arg> Input file, one path per line
-l,--log_home <arg> Test Result log directory. Must be writable.
Default is <UserHome>/audit-test-logs/. Created if
not exists
Exiting on exception Cannot invoke "org.apache.commons.cli.CommandLine.hasOption(String)" because "this.cl" is null
ERROR java.lang.NullPointer
Describe the bug Audit tool throws an unhandled exception when an unknown flag is given.
To Reproduce Launch
audit-tool
with the --help flag:You will see a warning about an unknown flag, the standard usage output (as if
audit-tool
was given with no arguments), but then you'll see an unhandled exception (see Screenshots below)Expected behavior Don't display the unhandled exception, exit with return code 0
Screenshots This shows the existing behavior