aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/blaze_util_mingw.cc
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2016-02-03 21:43:47 +0000
committerGravatar David Chen <dzc@google.com>2016-02-03 22:07:37 +0000
commit45d07a14ffd1474e08e5bda09937de196092dd6a (patch)
tree1f49d9f71c5f5846c8953ade754b57e2af18565c /src/main/cpp/blaze_util_mingw.cc
parentf8c673230e08aa1bd6c303a3ebb2aa79af988a62 (diff)
Propagate BAZEL_SH from launcher to subprocess on Windows.
This is the only variable we need to propagate to bootstrap Bazel. We might need to have a more principled approach for this, e.g. for MakeVariables. Needed for #276. -- MOS_MIGRATED_REVID=113777759
Diffstat (limited to 'src/main/cpp/blaze_util_mingw.cc')
-rw-r--r--src/main/cpp/blaze_util_mingw.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/cpp/blaze_util_mingw.cc b/src/main/cpp/blaze_util_mingw.cc
index d9064d148f..c8e2d1234b 100644
--- a/src/main/cpp/blaze_util_mingw.cc
+++ b/src/main/cpp/blaze_util_mingw.cc
@@ -194,6 +194,11 @@ void ExecuteProgram(const string& exe, const vector<string>& args_vector) {
STARTUPINFO startupinfo = {0};
PROCESS_INFORMATION pi = {0};
+ // Propagate BAZEL_SH environment variable to a sub-process.
+ // todo(dslomov): More principled approach to propagating
+ // environment variables.
+ SetEnvironmentVariable("BAZEL_SH", getenv("BAZEL_SH"));
+
bool success = CreateProcess(
nullptr, // _In_opt_ LPCTSTR lpApplicationName,
actual_line, // _Inout_opt_ LPTSTR lpCommandLine,