mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
feat: print every config error message
This commit is contained in:
@ -42,14 +42,17 @@ 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);
|
||||||
|
|
||||||
if (!cfg._errors.empty()) {
|
|
||||||
try stdout.print("Config is not valid path={s}", .{config_path});
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
try cfg.loadDefaultFiles(alloc);
|
try cfg.loadDefaultFiles(alloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
if (!cfg._errors.empty()) {
|
||||||
|
for (cfg._errors.list.items) |err| {
|
||||||
|
try stdout.print("{s}\n", .{err.message});
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user