Skip to content
Snippets Groups Projects
Commit f4bafa82 authored by Tim Felgentreff's avatar Tim Felgentreff
Browse files

[GR-9060] Allow all access in launcher.

PullRequest: fastr/1458
parents b6461458 1481770c
No related branches found
No related tags found
No related merge requests found
......@@ -165,8 +165,8 @@ public class RCommand {
RCmdOptions options = RCmdOptions.parseArguments(Client.R, argsList.toArray(new String[argsList.size()]), false);
assert env == null || env.length == 0 : "re-enable setting environments";
ConsoleHandler consoleHandler = createConsoleHandler(options, null, inStream, outStream);
try (Context context = Context.newBuilder().allowHostAccess(useJVM).options(polyglotOptions).arguments("R", options.getArguments()).in(consoleHandler.createInputStream()).out(outStream).err(
errStream).build()) {
try (Context context = Context.newBuilder().allowAllAccess(true).allowHostAccess(useJVM).options(polyglotOptions).arguments("R", options.getArguments()).in(
consoleHandler.createInputStream()).out(outStream).err(errStream).build()) {
consoleHandler.setContext(context);
StartupTiming.timestamp("VM Created");
StartupTiming.printSummary();
......
......@@ -138,8 +138,8 @@ public class RscriptCommand {
String[] arguments = preprocessRScriptOptions(launcher, options);
ConsoleHandler consoleHandler = RCommand.createConsoleHandler(options, null, inStream, outStream);
try (Context context = Context.newBuilder().allowHostAccess(useJVM).options(polyglotOptions).arguments("R", arguments).in(consoleHandler.createInputStream()).out(outStream).err(
errStream).build()) {
try (Context context = Context.newBuilder().allowAllAccess(true).allowHostAccess(useJVM).options(polyglotOptions).arguments("R", arguments).in(consoleHandler.createInputStream()).out(
outStream).err(errStream).build()) {
consoleHandler.setContext(context);
String fileOption = options.getString(RCmdOption.FILE);
return RCommand.readEvalPrint(context, consoleHandler, fileOption != null ? new File(fileOption) : null);
......
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