commit 768cb7e406fe26711167cbb2d67efdc10f830fdc (tree)
parent dad07fb6f33d9024dc6528ca3de37715fbc13182
Author: Andrew Kelley <andrew@ziglang.org>
Date: Thu, 11 Jul 2024 16:23:49 -0700
objcopy: use the fatal helper method
Diffstat:
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lib/compiler/objcopy.zig b/lib/compiler/objcopy.zig
@@ -198,20 +198,14 @@ fn cmdObjCopy(
return std.process.cleanExit();
},
.update => {
- if (seen_update) {
- std.debug.print("zig objcopy only supports 1 update for now\n", .{});
- std.process.exit(1);
- }
+ if (seen_update) fatal("zig objcopy only supports 1 update for now", .{});
seen_update = true;
try server.serveEmitBinPath(output, .{
.flags = .{ .cache_hit = false },
});
},
- else => {
- std.debug.print("unsupported message: {s}", .{@tagName(hdr.tag)});
- std.process.exit(1);
- },
+ else => fatal("unsupported message: {s}", .{@tagName(hdr.tag)}),
}
}
}