Skip to content

Commit 4659f43

Browse files
committed
fix usage of absolute paths
1 parent 0562a0d commit 4659f43

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

toolchain/zig-wrapper.zig

+7-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,13 @@ fn parseArgs(
207207
);
208208
};
209209

210-
const zig_cache_dir = try fs.path.join(arena, &[_][]const u8{ cwd.realpathAlloc(arena, ".") catch unreachable, CACHE_DIR });
210+
const zig_cache_dir = if (CACHE_DIR[0] == sep[0])
211+
CACHE_DIR
212+
else
213+
try fs.path.join(arena, &[_][]const u8{
214+
cwd.realpathAlloc(arena, ".") catch unreachable,
215+
CACHE_DIR,
216+
});
211217
const zig_lib_dir = try fs.path.join(arena, &[_][]const u8{ root, "lib" });
212218
const zig_exe = try fs.path.join(
213219
arena,

0 commit comments

Comments
 (0)