Skip to content

Commit

Permalink
fix build for zig 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Jul 3, 2024
1 parent fcba242 commit 802580b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
zig-cache/
zig-out/
docs/
.zig-cache/
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn build(b: *Build) !void {

if (comptime @hasDecl(@TypeOf(cross_tar.*), "setCwd")) {
// Zig 0.12.0
cross_tar.setCwd(.{ .path = "./zig-out/bin/" });
cross_tar.setCwd(b.path("./zig-out/bin/"));
} else {
// Zig 0.11
cross_tar.cwd = "./zig-out/bin/";
Expand Down
2 changes: 1 addition & 1 deletion src/builtins.zig
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ pub fn writef(dt: *DtMachine) !void {
const theCwdPath = try std.process.getCwdAlloc(dt.alloc);
var theCwd = try std.fs.openDirAbsolute(theCwdPath, .{});

try theCwd.writeFile(filename, contents);
try theCwd.writeFile(.{ .data = contents, .sub_path = filename });
theCwd.close();
}

Expand Down

0 comments on commit 802580b

Please sign in to comment.