Fix patchExternalFilePath for blaze without jar cache.
We never ran into this with jar cache enabled, but the original implementation
didn't consider blaze outputs. Now that we disabled jar cache on mac, one
unlucky user with /external/ in their path just happen to run into this.
@@ -389,7 +389,9 @@ public class JarCache {
*/
private static File patchExternalFilePath(File maybeExternal) {
String externalString = maybeExternal.toString();
- if (externalString.contains("/external/") && !externalString.contains("/bazel-out/")) {
+ if (externalString.contains("/external/")
+ && !externalString.contains("/bazel-out/")
+ && !externalString.contains("/blaze-out/")) {
return new File(externalString.replaceAll("/execroot.*/external/", "/external/"));
}
return maybeExternal;
