Skip to content

Commit

Permalink
Do not use process-wrapper in RunCommand on Windows.
Browse files Browse the repository at this point in the history
Fixes bazelbuild#1852.

RELNOTES: None.

Closes bazelbuild#3370.

PiperOrigin-RevId: 162209884
  • Loading branch information
philwo authored and damienmg committed Jul 18, 2017
1 parent 774fa71 commit 7eefb7c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import com.google.devtools.build.lib.util.CommandFailureUtils;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.util.FileType;
import com.google.devtools.build.lib.util.OS;
import com.google.devtools.build.lib.util.OptionsUtils;
import com.google.devtools.build.lib.util.OsUtils;
import com.google.devtools.build.lib.util.Preconditions;
Expand Down Expand Up @@ -253,7 +254,10 @@ public ExitCode exec(CommandEnvironment env, OptionsProvider options) {
options.getOptions(BuildRequestOptions.class).getSymlinkPrefix(productName),
productName);
List<String> cmdLine = new ArrayList<>();
if (runOptions.scriptPath == null) {
// process-wrapper does not work on Windows (nor is it necessary), so don't use it
// on that platform. Also we skip it when writing the command-line to a file instead
// of executing it directly.
if (OS.getCurrent() != OS.WINDOWS && runOptions.scriptPath == null) {
PathFragment processWrapperPath =
env.getBlazeWorkspace().getBinTools().getExecPath(PROCESS_WRAPPER);
Preconditions.checkNotNull(
Expand Down

0 comments on commit 7eefb7c

Please sign in to comment.