Bazel client, Windows: implement GetHomeDir
Create a method in blaze_util_<platform> to
retrieve the path to the home dir ($HOME on
Linux/macOS, %USERPROFILE% on Windows), where we
look for the user's bazelrc file (".bazelrc").
--
Change-Id: I86be1dbe1f992ad55eb09b496024754099d54912
Reviewed-on: https://cr.bazel.build/9513
PiperOrigin-RevId: 151004759
MOS_MIGRATED_REVID=151004759
diff --git a/src/main/cpp/option_processor.cc b/src/main/cpp/option_processor.cc
index f025c30..66a09e3 100644
--- a/src/main/cpp/option_processor.cc
+++ b/src/main/cpp/option_processor.cc
@@ -283,7 +283,7 @@
return blaze_exit_code::SUCCESS;
}
- string home = blaze::GetEnv("HOME");
+ string home = blaze::GetHomeDir();
if (home.empty()) {
*blaze_rc_file = "";
return blaze_exit_code::SUCCESS;