Skip to content

Commit

Permalink
fix usage of absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisirhc committed Nov 19, 2024
1 parent 04205e4 commit 59f75ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion toolchain/zig-wrapper.zig
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,13 @@ fn parseArgs(
);
};

const zig_cache_dir = try fs.path.join(arena, &[_][]const u8{ cwd.realpathAlloc(arena, ".") catch unreachable, CACHE_DIR });
const zig_cache_dir = if (CACHE_DIR[0] == sep[0])
CACHE_DIR
else
try fs.path.join(arena, &[_][]const u8{
cwd.realpathAlloc(arena, ".") catch unreachable,
CACHE_DIR,
});
const zig_lib_dir = try fs.path.join(arena, &[_][]const u8{ root, "lib" });
const zig_exe = try fs.path.join(
arena,
Expand Down

0 comments on commit 59f75ed

Please sign in to comment.