diff options
author | 2018-03-26 02:14:57 -0700 | |
---|---|---|
committer | 2018-03-26 02:15:50 -0700 | |
commit | 6661809df52a21ec4e192f8adb01cba7d73ee083 (patch) | |
tree | 6d5f6a46394f77427369298a9de419c1db29e994 /src/main/java/com/google/devtools/build/lib/runtime | |
parent | 02f9956fbcfd9dcd1fffb9e930ec1d0ec8b04b80 (diff) |
Make "blaze run --direct_run" wrap the command in a shell.
This mimics "--nodirect_run". Apparently, a lot of people depend on this :(
RELNOTES: None.
PiperOrigin-RevId: 190433808
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java index f40920fe1c..88c9fa12b9 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/RunCommand.java @@ -491,7 +491,12 @@ public class RunCommand implements BlazeCommand { .setWorkingDirectory( ByteString.copyFrom(workingDir.getPathString(), StandardCharsets.ISO_8859_1)); - for (String arg : cmdLine) { + ImmutableList<String> shellCmdLine = ImmutableList.<String>of( + configuration.getShellExecutable().getPathString(), + "-c", + ShellEscaper.escapeJoinAll(cmdLine)); + + for (String arg : shellCmdLine) { execDescription.addArgv(ByteString.copyFrom(arg, StandardCharsets.ISO_8859_1)); } |