diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-10 09:58:31 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-11 09:58:59 -0300 |
| commit | eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c (patch) | |
| tree | cc993ad239451adb6f23645ee5ca001802832ed0 /tools | |
| parent | 38e9919a9ea9055538409b388d580c4e4c838434 (diff) | |
| download | pardes-eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c.tar.gz pardes-eb11ab331b4e13e2b9e5a673a4c012d22fdd1d9c.zip | |
macos: the AppKit shell, its icon, and the offscreen e2e harness
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/embed_zig_sources.zig | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/embed_zig_sources.zig b/tools/embed_zig_sources.zig index 61427415..9934d09a 100644 --- a/tools/embed_zig_sources.zig +++ b/tools/embed_zig_sources.zig @@ -32,7 +32,16 @@ pub fn main(init: std.process.Init) !void { for (paths) |path| { const full_path = try std.Io.Dir.path.join(gpa, &.{ root, path }); defer gpa.free(full_path); - const contents = try std.Io.Dir.cwd().readFileAlloc(io, full_path, gpa, .limited(64 * 1024 * 1024)); + // `git ls-files` reports the INDEX, not the working tree, and the two + // disagree the moment a file is moved or deleted without staging it — + // an ordinary mid-edit state, and in a jj-colocated repo the normal one + // until the change is exported. A path that is no longer on disk is + // simply not a source to embed; failing the whole web build over it + // means an unrelated refactor breaks a shell it never touched. + const contents = std.Io.Dir.cwd().readFileAlloc(io, full_path, gpa, .limited(64 * 1024 * 1024)) catch |err| switch (err) { + error.FileNotFound => continue, + else => return err, + }; defer gpa.free(contents); try generated.writer.print(" .{{ .path = \"{f}\", .contents = \"{f}\" }},\n", .{ std.zig.fmtString(path), |
