Skip to content

Commit c6b64bc

Browse files
committed
Make it clear --help is handled by org.graalvm.launcher.Launcher#printDefaultHelp
1 parent c3676a7 commit c6b64bc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/launcher/java/org/truffleruby/launcher/CommandLineParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,10 @@ private void processArgument() throws CommandLineException {
432432
disallowedInRubyOpts(argument);
433433
warnInternalDebugTool(argument);
434434
break FOR;
435-
} else if (rubyOpts && argument.equals("--help")) {
435+
} else if (argument.equals("--help")) {
436436
disallowedInRubyOpts(argument);
437+
// --help is handled by org.graalvm.launcher.Launcher#printDefaultHelp
438+
config.getUnknownArguments().add(argument);
437439
break FOR;
438440
} else if (argument.equals("--version")) {
439441
disallowedInRubyOpts(argument);

src/launcher/java/org/truffleruby/launcher/RubyLauncher.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,7 @@ private void printPreRunInformation(CommandLineOptions config) {
372372
case SHORT:
373373
printShortHelp(getOutput());
374374
break;
375-
case LONG:
376-
printHelp(getOutput());
377-
break;
375+
// --help is handled by org.graalvm.launcher.Launcher#printDefaultHelp
378376
}
379377
}
380378

src/launcher/java/org/truffleruby/launcher/ShowHelp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
public enum ShowHelp {
1313
NONE,
14-
SHORT,
15-
LONG
14+
SHORT // -h
15+
// LONG // --help is handled by org.graalvm.launcher.Launcher#printDefaultHelp
1616
}

0 commit comments

Comments
 (0)