diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/sandbox/SandboxStrategy.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/sandbox/SandboxStrategy.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxStrategy.java b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxStrategy.java index b91d3dd57e..18df3d0387 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxStrategy.java @@ -28,6 +28,7 @@ import com.google.devtools.build.lib.analysis.BlazeDirectories; import com.google.devtools.build.lib.buildtool.BuildRequest; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.EventHandler; +import com.google.devtools.build.lib.util.io.OutErr; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import java.io.IOException; @@ -69,13 +70,15 @@ abstract class SandboxStrategy implements SandboxedSpawnActionContext { throws ExecException, InterruptedException { EventHandler eventHandler = actionExecutionContext.getExecutor().getEventHandler(); ExecException execException = null; + OutErr outErr = actionExecutionContext.getFileOutErr(); try { runner.run( spawn.getArguments(), spawnEnvironment, - actionExecutionContext.getFileOutErr(), + outErr, Spawns.getTimeoutSeconds(spawn), - SandboxHelpers.shouldAllowNetwork(buildRequest, spawn)); + SandboxHelpers.shouldAllowNetwork(buildRequest, spawn), + sandboxOptions.sandboxDebug); } catch (ExecException e) { execException = e; } @@ -102,6 +105,10 @@ abstract class SandboxStrategy implements SandboxedSpawnActionContext { } if (execException != null) { + outErr.printErr( + "Use --strategy=" + + spawn.getMnemonic() + + "=standalone to disable sandboxing for the failing actions.\n"); throw execException; } } |