mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
termio: respect GHOSTTY_RESOURCES_DIR
This commit is contained in:
@ -533,10 +533,18 @@ const Subprocess = struct {
|
|||||||
|
|
||||||
// Get our bundled resources directory, if it exists. We use this
|
// Get our bundled resources directory, if it exists. We use this
|
||||||
// for terminfo, shell-integration, etc.
|
// for terminfo, shell-integration, etc.
|
||||||
const resources_dir = try resourcesDir(alloc);
|
const resources_key = "GHOSTTY_RESOURCES_DIR";
|
||||||
if (resources_dir) |dir| {
|
const resources_dir = if (env.get(resources_key)) |dir| dir: {
|
||||||
try env.put("GHOSTTY_RESOURCES_DIR", dir);
|
log.info("using Ghostty resources dir from env var: {s}", .{dir});
|
||||||
}
|
break :dir dir;
|
||||||
|
} else if (try resourcesDir(alloc)) |dir| dir: {
|
||||||
|
log.info("found Ghostty resources dir: {s}", .{dir});
|
||||||
|
try env.put(resources_key, dir);
|
||||||
|
break :dir dir;
|
||||||
|
} else dir: {
|
||||||
|
log.warn("Ghostty resources dir not found, some features disabled", .{});
|
||||||
|
break :dir null;
|
||||||
|
};
|
||||||
|
|
||||||
// Set our TERM var. This is a bit complicated because we want to use
|
// Set our TERM var. This is a bit complicated because we want to use
|
||||||
// the ghostty TERM value but we want to only do that if we have
|
// the ghostty TERM value but we want to only do that if we have
|
||||||
|
Reference in New Issue
Block a user