Add --help to GerritLauncher

The launcher did not support any help switches, yet it did have a help
message which was output when no switches were supplied. Add a quick
--help switch and -h shorthand to make the launcher a bit friendlier
and safer to probe.

Change-Id: I6a6acfbaafc176894fbf4cbeb51452ea8018cf86
(cherry picked from commit 4b385d884d)
This commit is contained in:
mfick 2018-11-13 10:26:12 -07:00 committed by David Pursehouse
parent 8ec3e93e35
commit e4b1da282f
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ public final class GerritLauncher {
* @throws Exception if any error occurs.
*/
public static int mainImpl(String[] argv) throws Exception {
if (argv.length == 0) {
if (argv.length == 0 || "-h".equals(argv[0]) || "--help".equals(argv[0])) {
File me;
try {
me = getDistributionArchive();