Ignore failure during touchFile on a cached file in the repository cache.
RELNOTES: Bazel now supports reading cache hits from a repository cache, even if it doesn't have write access to the cache.
@@ -148,7 +148,12 @@ public class RepositoryCache {
} else {
FileSystemUtils.copyFile(cacheValue, targetPath);
}
+
+ try {
FileSystemUtils.touchFile(cacheValue);
+ } catch (IOException e) {
+ // Ignore, because the cache might be on a read-only volume.
+ }
return targetPath;
}
