Skip to content

Commit 658e6a9

Browse files
committed
fix: set resources_dir on FreeBSD
1 parent c6f1495 commit 658e6a9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/os/resourcesdir.zig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ pub fn resourcesDir(alloc: std.mem.Allocator) !?[]const u8 {
5555
}
5656
}
5757

58+
// On FreeBSD, we look for /usr/local/share path.
59+
if (comptime builtin.target.os.tag == .freebsd) {
60+
inline for (sentinels) |sentinel| {
61+
if (try maybeDir(&dir_buf, dir, "local/share", sentinel)) |v| {
62+
return try std.fs.path.join(alloc, &.{v});
63+
}
64+
}
65+
}
66+
5867
// On all platforms, we look for a /usr/share style path. This
5968
// is valid even on Mac since there is nothing that requires
6069
// Ghostty to be in an app bundle.

0 commit comments

Comments
 (0)