mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
fix: handle recursive config files
This commit is contained in:
@ -42,17 +42,20 @@ pub fn run(alloc: std.mem.Allocator) !u8 {
|
|||||||
const abs_path = try std.fs.cwd().realpath(config_path, &buf);
|
const abs_path = try std.fs.cwd().realpath(config_path, &buf);
|
||||||
|
|
||||||
try cfg.loadFile(alloc, abs_path);
|
try cfg.loadFile(alloc, abs_path);
|
||||||
|
try cfg.loadRecursiveFiles(alloc);
|
||||||
} else {
|
} else {
|
||||||
try cfg.loadDefaultFiles(alloc);
|
cfg = try Config.load(alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try cfg.finalize();
|
||||||
|
|
||||||
if (!cfg._errors.empty()) {
|
if (!cfg._errors.empty()) {
|
||||||
for (cfg._errors.list.items) |err| {
|
for (cfg._errors.list.items) |err| {
|
||||||
try stdout.print("{s}\n", .{err.message});
|
try stdout.print("{s}\n", .{err.message});
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 65;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user