Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

fix(test): companion receipt test survives hosts without /bin/false

justrachf2cadfb69723
diff --git a/src/session_connect_tests.zig b/src/session_connect_tests.zig
index 31a64a2f..f30a620e 100644
--- a/src/session_connect_tests.zig
+++ b/src/session_connect_tests.zig
@@ -49,7 +49,10 @@ test "connectCompanion yolo writes the companion receipt and does not addServer"
const io = std.testing.io;
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
- try tmp.dir.symLink(io, "/bin/false", "codedb-pro", .{});
+ // A plain file satisfies binOnPath's access() probe. A symlink to
+ // /bin/false does not on every host: access() follows the link, and newer
+ // macOS ships only /usr/bin/false.
+ (try tmp.dir.createFile(io, "codedb-pro", .{})).close(io);
var path_buf: [std.fs.max_path_bytes]u8 = undefined;
const n = try tmp.dir.realPath(io, &path_buf);
const saved_path = main_mod.g_path_env;