authorgravatar for phugen@redhat.comPablo Alessandro Santos Hugen <phugen@redhat.com> 2026-01-29 19:24:39-03:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-30 06:19:49+01:00
logad0458f5826a9283df3e152fea24869d0914634d
treec63de50e2817717154b37a0428341aab57917ec1
parentecb9ddf2672fa1f067c240d914a5baf3a4d2d8a4

std.Build: Fix wrong error enum

Signed-off-by: Pablo Alessandro Santos Hugen <phugen@redhat.com>

1 files changed, 6 insertions(+), 7 deletions(-)

lib/std/Build/Step/Run.zig+6-7
......@@ -1033,8 +1033,8 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
10331033 if (any_output) {
10341034 const o_sub_path = "o" ++ Dir.path.sep_str ++ &digest;
10351035
1036 b.cache_root.handle.rename(tmp_dir_path, b.cache_root.handle, o_sub_path, io) catch |err| {
1037 if (err == error.PathAlreadyExists) {
1036 b.cache_root.handle.rename(tmp_dir_path, b.cache_root.handle, o_sub_path, io) catch |err| switch (err) {
1037 Dir.RenameError.DirNotEmpty => {
10381038 b.cache_root.handle.deleteTree(io, o_sub_path) catch |del_err| {
10391039 return step.fail("unable to remove dir '{f}'{s}: {t}", .{
10401040 b.cache_root, tmp_dir_path, del_err,
......@@ -1045,11 +1045,10 @@ fn make(step: *Step, options: Step.MakeOptions) !void {
10451045 b.cache_root, tmp_dir_path, b.cache_root, o_sub_path, retry_err,
10461046 });
10471047 };
1048 } else {
1049 return step.fail("unable to rename dir '{f}{s}' to '{f}{s}': {t}", .{
1050 b.cache_root, tmp_dir_path, b.cache_root, o_sub_path, err,
1051 });
1052 }
1048 },
1049 else => return step.fail("unable to rename dir '{f}{s}' to '{f}{s}': {t}", .{
1050 b.cache_root, tmp_dir_path, b.cache_root, o_sub_path, err,
1051 }),
10531052 };
10541053 }
10551054