standalone: support relative cache path

This commit is contained in:
Jacob Young 2024-05-08 18:12:23 -04:00 committed by Andrew Kelley
parent 6bc0cef607
commit d9b00ee4ba

View File

@ -55,7 +55,7 @@ pub fn build(b: *std.Build) void {
const abs_path = setup_abspath: {
const temp_dir = b.makeTempPath();
var dir = std.fs.openDirAbsolute(temp_dir, .{}) catch @panic("failed to open temp dir");
var dir = std.fs.cwd().openDir(temp_dir, .{}) catch @panic("failed to open temp dir");
defer dir.close();
var file = dir.createFile("foo.txt", .{}) catch @panic("failed to create file");