mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
main: only check for CLI actions on non-lib builds
This commit is contained in:
13
src/main.zig
13
src/main.zig
@ -201,12 +201,15 @@ pub const GlobalState = struct {
|
||||
};
|
||||
|
||||
// We first try to parse any action that we may be executing.
|
||||
self.action = try cli_action.Action.detectCLI(self.alloc);
|
||||
// We do not execute this in the lib because os.argv is not set.
|
||||
if (comptime build_config.artifact != .lib) {
|
||||
self.action = try cli_action.Action.detectCLI(self.alloc);
|
||||
|
||||
// If we have an action executing, we disable logging by default
|
||||
// since we write to stderr we don't want logs messing up our
|
||||
// output.
|
||||
if (self.action != null) self.logging = .{ .disabled = {} };
|
||||
// If we have an action executing, we disable logging by default
|
||||
// since we write to stderr we don't want logs messing up our
|
||||
// output.
|
||||
if (self.action != null) self.logging = .{ .disabled = {} };
|
||||
}
|
||||
|
||||
// I don't love the env var name but I don't have it in my heart
|
||||
// to parse CLI args 3 times (once for actions, once for config,
|
||||
|
Reference in New Issue
Block a user