diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-08 19:41:21 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | ebdbbd20ace6e93b581b90075f52946b3832da93 (patch) | |
| tree | 09fb393f4a4578512ddf4906c7df14df5f6f9255 /lib/std/Build | |
| parent | 3725f72293c87a73e0c11e74739574c7b78bb53d (diff) | |
| download | zig-ebdbbd20ace6e93b581b90075f52946b3832da93.tar.gz zig-ebdbbd20ace6e93b581b90075f52946b3832da93.zip | |
update makeDir() sites to specify permissions
Diffstat (limited to 'lib/std/Build')
| -rw-r--r-- | lib/std/Build/Step/CheckObject.zig | 2 | ||||
| -rw-r--r-- | lib/std/Build/Step/RemoveDir.zig | 11 | ||||
| -rw-r--r-- | lib/std/Build/Step/Run.zig | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/std/Build/Step/CheckObject.zig b/lib/std/Build/Step/CheckObject.zig index c6c11ce2b9..ac8fafaa3f 100644 --- a/lib/std/Build/Step/CheckObject.zig +++ b/lib/std/Build/Step/CheckObject.zig @@ -547,12 +547,14 @@ pub fn checkComputeCompare( fn make(step: *Step, make_options: Step.MakeOptions) !void { _ = make_options; const b = step.owner; + const io = b.graph.io; const gpa = b.allocator; const check_object: *CheckObject = @fieldParentPtr("step", step); try step.singleUnchangingWatchInput(check_object.source); const src_path = check_object.source.getPath3(b, step); const contents = src_path.root_dir.handle.readFileAllocOptions( + io, src_path.sub_path, gpa, .limited(check_object.max_bytes), diff --git a/lib/std/Build/Step/RemoveDir.zig b/lib/std/Build/Step/RemoveDir.zig index e2d4c02abc..6f933da9ee 100644 --- a/lib/std/Build/Step/RemoveDir.zig +++ b/lib/std/Build/Step/RemoveDir.zig @@ -27,6 +27,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { _ = options; const b = step.owner; + const io = b.graph.io; const remove_dir: *RemoveDir = @fieldParentPtr("step", step); step.clearWatchInputs(); @@ -34,15 +35,11 @@ fn make(step: *Step, options: Step.MakeOptions) !void { const full_doomed_path = remove_dir.doomed_path.getPath2(b, step); - b.build_root.handle.deleteTree(full_doomed_path) catch |err| { + b.build_root.handle.deleteTree(io, full_doomed_path) catch |err| { if (b.build_root.path) |base| { - return step.fail("unable to recursively delete path '{s}/{s}': {s}", .{ - base, full_doomed_path, @errorName(err), - }); + return step.fail("unable to recursively delete path '{s}/{s}': {t}", .{ base, full_doomed_path, err }); } else { - return step.fail("unable to recursively delete path '{s}': {s}", .{ - full_doomed_path, @errorName(err), - }); + return step.fail("unable to recursively delete path '{s}': {t}", .{ full_doomed_path, err }); } }; } diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index e52dd21a96..19d2e7e61c 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -1044,7 +1044,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { b.cache_root.handle.rename(tmp_dir_path, b.cache_root.handle, o_sub_path, io) catch |err| { if (err == error.PathAlreadyExists) { - b.cache_root.handle.deleteTree(o_sub_path) catch |del_err| { + b.cache_root.handle.deleteTree(io, o_sub_path) catch |del_err| { return step.fail("unable to remove dir '{f}'{s}: {t}", .{ b.cache_root, tmp_dir_path, del_err, }); |
