Skip to content

Commit e123248

Browse files
steve-sansalond
authored andcommitted
Launcher fix: let the polyglot options to be processed by the polyglot launcher
(cherry picked from commit 51e7b1b)
1 parent b8837f1 commit e123248

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ private enum RCmdOptionType {
6464
}
6565

6666
public enum RCmdOption {
67-
HELP(RCmdOptionType.BOOLEAN, true, "h", "help", false, "Print short help message and exit"),
6867
VERSION(RCmdOptionType.BOOLEAN, true, "version", false, "Print version info and exit"),
6968
ENCODING(RCmdOptionType.STRING, false, "encoding=ENC", null, "Specify encoding to be used for stdin"),
7069
SAVE(RCmdOptionType.BOOLEAN, true, "save", false, "Do save workspace at the end of the session"),

com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RscriptCommand.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.List;
3232
import java.util.Map;
3333

34+
import org.graalvm.options.OptionCategory;
3435
import org.graalvm.polyglot.PolyglotException;
3536
import org.graalvm.polyglot.Source;
3637

@@ -52,13 +53,11 @@ public final class RscriptCommand extends RAbstractLauncher {
5253
}
5354

5455
@Override
55-
protected List<String> preprocessArguments(List<String> arguments, Map<String, String> polyglotOptions) {
56-
List<String> unrecognizedArgs = super.preprocessArguments(arguments, polyglotOptions);
56+
protected void validateArguments(Map<String, String> polyglotOptions) {
5757
try {
5858
this.rScriptArguments = preprocessRScriptOptions(options);
59-
return unrecognizedArgs;
6059
} catch (PrintHelp e) {
61-
return Collections.singletonList("--help");
60+
printHelp(OptionCategory.USER);
6261
}
6362
}
6463

0 commit comments

Comments
 (0)