diff options
author | 2017-02-23 15:43:54 +0000 | |
---|---|---|
committer | 2017-02-24 08:28:44 +0000 | |
commit | e64ed19eeb50222c6c8b7935e3d66a6090a03999 (patch) | |
tree | 8031cc08a74c50455396052d4f628345ad6b18db /src/main/cpp/blaze_util_platform.h | |
parent | 71c72c1515eb92730c28bebf65c925eadbe7b5a9 (diff) |
Bazel client: make jvm.log path platform-safe
When writing the javalog.properties file that
configures the java logger, pass the log file path
in a platform safe manner. Namely if we're
running on Windows, don't write paths with
backslashes because they are mistaken for paths
with escaped characters.
Fixes: https://github.com/bazelbuild/bazel/issues/2576
--
Change-Id: Ibd907c13f1ffe4561c3a4e737f0c2b25ec5d4b17
Reviewed-on: https://cr.bazel.build/9059
PiperOrigin-RevId: 148342757
MOS_MIGRATED_REVID=148342757
Diffstat (limited to 'src/main/cpp/blaze_util_platform.h')
-rw-r--r-- | src/main/cpp/blaze_util_platform.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/cpp/blaze_util_platform.h b/src/main/cpp/blaze_util_platform.h index 18efa8e78f..2f313a4eeb 100644 --- a/src/main/cpp/blaze_util_platform.h +++ b/src/main/cpp/blaze_util_platform.h @@ -127,6 +127,10 @@ std::string ConvertPath(const std::string& path); // is Windows path list. std::string ConvertPathList(const std::string& path_list); +// Converts `path` to a string that's safe to pass as path in a JVM flag. +// See https://github.com/bazelbuild/bazel/issues/2576 +std::string PathAsJvmFlag(const std::string& path); + // Return a string used to separate paths in a list. std::string ListSeparator(); |