Skip to content

Commit b92d1e1

Browse files
committed
dep-hash: fix dir resolution with --build-root
1 parent 2c60894 commit b92d1e1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/compiler/dep-hash.zig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ pub fn main() !void {
6262
}
6363
}
6464

65+
if (build_root_path) |build_root| {
66+
if (!std.fs.path.isAbsolute(build_root)) {
67+
const cwd = try std.process.getCwdAlloc(arena);
68+
build_root_path = try std.fs.path.resolve(arena, &.{ cwd, build_root });
69+
}
70+
}
71+
6572
var build_root = try std.zig.findBuildRoot(arena, .{
6673
.cwd_path = build_root_path,
6774
.hint = build_root_path == null,

0 commit comments

Comments
 (0)