mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-21 19:26:09 +03:00
if no argv, then don't load CLI args
This commit is contained in:
@ -562,6 +562,13 @@ pub const Config = struct {
|
|||||||
|
|
||||||
/// Load and parse the CLI args.
|
/// Load and parse the CLI args.
|
||||||
pub fn loadCliArgs(self: *Config, alloc_gpa: Allocator) !void {
|
pub fn loadCliArgs(self: *Config, alloc_gpa: Allocator) !void {
|
||||||
|
switch (builtin.os.tag) {
|
||||||
|
.windows => {},
|
||||||
|
|
||||||
|
// Fast-path if we are non-Windows and no args, do nothing.
|
||||||
|
else => if (std.os.argv.len <= 1) return,
|
||||||
|
}
|
||||||
|
|
||||||
// Parse the config from the CLI args
|
// Parse the config from the CLI args
|
||||||
var iter = try std.process.argsWithAllocator(alloc_gpa);
|
var iter = try std.process.argsWithAllocator(alloc_gpa);
|
||||||
defer iter.deinit();
|
defer iter.deinit();
|
||||||
|
Reference in New Issue
Block a user