Skip to content
Snippets Groups Projects
Commit 3ac7f096 authored by Christian Humer's avatar Christian Humer
Browse files

Fix RscriptCommand for new launcher in GraalVM.

parent 50414729
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ public class RscriptCommand {
// Either -e options are set or first non-option arg is a file
if (options.getStringList(EXPR) == null) {
if (firstNonOptionArgIndex == resultArgsLength) {
System.err.println("filename is missing");
RCmdOptions.printHelp(RCmdOptions.Client.RSCRIPT, 0);
Utils.exit(2);
} else {
options.setValue(FILE, arguments[firstNonOptionArgIndex]);
......
......@@ -127,7 +127,7 @@ public final class Utils {
*/
public static RuntimeException exit(int status) {
RPerfStats.report();
if (RContext.getInstance().getOptions().getString(RCmdOption.DEBUGGER) != null) {
if (RContext.getInstance() != null && RContext.getInstance().getOptions() != null && RContext.getInstance().getOptions().getString(RCmdOption.DEBUGGER) != null) {
throw new DebugExitException();
} else {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment