mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
apprt/gtk: exit if there are CLI errors
This commit is contained in:
@ -131,6 +131,12 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
|
|||||||
log.warn("configuration error: {s}", .{buf.items});
|
log.warn("configuration error: {s}", .{buf.items});
|
||||||
buf.clearRetainingCapacity();
|
buf.clearRetainingCapacity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we have any CLI errors, exit.
|
||||||
|
if (config._diagnostics.containsLocation(.cli)) {
|
||||||
|
log.warn("CLI errors detected, exiting", .{});
|
||||||
|
std.posix.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.gtk_init();
|
c.gtk_init();
|
||||||
@ -1368,10 +1374,7 @@ fn gtkActionQuit(
|
|||||||
ud: ?*anyopaque,
|
ud: ?*anyopaque,
|
||||||
) callconv(.C) void {
|
) callconv(.C) void {
|
||||||
const self: *App = @ptrCast(@alignCast(ud orelse return));
|
const self: *App = @ptrCast(@alignCast(ud orelse return));
|
||||||
self.core_app.setQuit() catch |err| {
|
self.core_app.setQuit();
|
||||||
log.warn("error setting quit err={}", .{err});
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Action sent by the window manager asking us to present a specific surface to
|
/// Action sent by the window manager asking us to present a specific surface to
|
||||||
|
Reference in New Issue
Block a user