diff --git a/lib/std/cache_hash.zig b/lib/std/cache_hash.zig index 6b3d6d7ba2..aa7ae6896d 100644 --- a/lib/std/cache_hash.zig +++ b/lib/std/cache_hash.zig @@ -186,6 +186,10 @@ pub const CacheHash = struct { return error.InvalidFormat; } + if (cache_hash_file.path == null) { + cache_hash_file.path = try mem.dupe(self.alloc, u8, file_path); + } + const this_file = fs.cwd().openFile(cache_hash_file.path.?, .{ .read = true }) catch { return error.CacheUnavailable; };