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
diff --git a/java/com/google/gerrit/launcher/GerritLauncher.java b/java/com/google/gerrit/launcher/GerritLauncher.java
index 0d26fe7..5406d52 100644
--- a/java/com/google/gerrit/launcher/GerritLauncher.java
+++ b/java/com/google/gerrit/launcher/GerritLauncher.java
@@ -78,7 +78,7 @@
* @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();