summaryrefslogtreecommitdiff
path: root/src/upgrade.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 13:13:17 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:56:36 -0300
commit4917ae452a15ff4f32d97d215a99fdcfaab29d61 (patch)
tree56e25907532aed6222807503bc7904fc34781e31 /src/upgrade.zig
parentcf9e075d3537698e76a8fb22dc1a63622ca78c45 (diff)
downloadpardes-4917ae452a15ff4f32d97d215a99fdcfaab29d61.tar.gz
pardes-4917ae452a15ff4f32d97d215a99fdcfaab29d61.zip
idioms #9, every catch unreachable this slice added is a fact of the code: each formats integers, literals, an error's name or a slice of a fixed array (the daemon's [128]u8 names, the cache's path_buf, main's cwd_buf, those two buffers now sized from their arrays), so all 39 stay, each with its reason on its own line
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/upgrade.zig')
-rw-r--r--src/upgrade.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/upgrade.zig b/src/upgrade.zig
index 5bd83a30..5a338ae2 100644
--- a/src/upgrade.zig
+++ b/src/upgrade.zig
@@ -285,9 +285,9 @@ pub fn check(path: [:0]const u8, buf: []u8) Checked {
else if (libc.W.IFEXITED(s) and libc.W.EXITSTATUS(s) == 127)
"would not start"
else if (libc.W.IFEXITED(s) and libc.W.EXITSTATUS(s) != 0)
- std.fmt.bufPrint(&tail, "exited {d} at --version", .{libc.W.EXITSTATUS(s)}) catch unreachable // fits 96
+ std.fmt.bufPrint(&tail, "exited {d} at --version", .{libc.W.EXITSTATUS(s)}) catch unreachable // a status number fits 96
else if (libc.W.IFSIGNALED(s))
- std.fmt.bufPrint(&tail, "died of signal {d} at --version", .{libc.W.TERMSIG(s)}) catch unreachable // fits 96
+ std.fmt.bufPrint(&tail, "died of signal {d} at --version", .{libc.W.TERMSIG(s)}) catch unreachable // a signal number fits 96
else
"does not answer --version as a pardes does";
return .{ .no = std.fmt.bufPrint(buf, "Upgrade: {s} {s}; this session stays as it is", .{ path[0..@min(path.len, 400)], how }) catch "Upgrade: the new pardes would not start; this session stays as it is" };