summaryrefslogtreecommitdiff
path: root/src/host_io.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 14:06:59 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit7cf2c9947ce0a5529b15835b7e1eecb30a2e68c2 (patch)
tree89262d1019246f4cff2cf1f5e0c80b927911a548 /src/host_io.zig
parentf8c325283fe87dd981babd2a132e58eb393924a1 (diff)
downloadpardes-7cf2c9947ce0a5529b15835b7e1eecb30a2e68c2.tar.gz
pardes-7cf2c9947ce0a5529b15835b7e1eecb30a2e68c2.zip
Not-found failures say it once, in plain words: grep: pattern not found, callers not found
The ENOENT that 9ns reads from a failure's words came from a tacked-on suffix, grep: no match, not found, definition: nothing found, not found, no shell "x", not found. They now say it once: grep: pattern not found, find: name not found, Callers: callers not found, definition: not found, shell "x" not found (...). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/host_io.zig')
-rw-r--r--src/host_io.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host_io.zig b/src/host_io.zig
index bbd664a9..9e3fbf79 100644
--- a/src/host_io.zig
+++ b/src/host_io.zig
@@ -933,7 +933,7 @@ pub const Shell = struct {
if (libc.access(@ptrCast(&buf), 0) == 0) return std.fmt.bufPrint(said, "not a shell: {s} is not executable", .{bin}) catch "not a shell: not executable";
}
// "not found": the words a mount reads as ENOENT.
- return std.fmt.bufPrint(said, "no shell \"{s}\", not found (a name on the usual paths, or a path to one)", .{bin}) catch "no such shell";
+ return std.fmt.bufPrint(said, "shell \"{s}\" not found (a name on the usual paths, or a path to one)", .{bin}) catch "no such shell";
}
/// The program a script's `#!` line names, when it is not there to
@@ -970,7 +970,7 @@ pub const Shell = struct {
var said: [320]u8 = undefined;
try std.testing.expectEqualStrings("interpreter /no/such/interp not found", refusal(try std.fmt.bufPrint(&path, "{s}/bad", .{dir}), &said).?);
try std.testing.expect(refusal(try std.fmt.bufPrint(&path, "{s}/good", .{dir}), &said) == null);
- try std.testing.expect(std.mem.startsWith(u8, refusal(try std.fmt.bufPrint(&path, "{s}/none", .{dir}), &said).?, "no shell "));
+ try std.testing.expect(std.mem.startsWith(u8, refusal(try std.fmt.bufPrint(&path, "{s}/none", .{dir}), &said).?, "shell \""));
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "plain", .data = "echo\n" });
const plain = try std.fmt.bufPrint(&path, "{s}/plain", .{dir});
try std.testing.expect(std.mem.endsWith(u8, refusal(plain, &said).?, "plain is not executable"));