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.
@@ -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));
}
