diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-10 21:51:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 21:51:57 +0300 |
| commit | 425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch) | |
| tree | e52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/cli/validate_config.zig | |
| parent | 90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff) | |
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/cli/validate_config.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/cli/validate_config.zig | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vendor/libghostty-vt/src/cli/validate_config.zig b/vendor/libghostty-vt/src/cli/validate_config.zig index 5586cf29..3d5f2886 100644 --- a/vendor/libghostty-vt/src/cli/validate_config.zig +++ b/vendor/libghostty-vt/src/cli/validate_config.zig @@ -3,6 +3,7 @@ const Allocator = std.mem.Allocator; const args = @import("args.zig"); const Action = @import("ghostty.zig").Action; const Config = @import("../config.zig").Config; +const global = @import("../global.zig"); pub const Options = struct { /// The path of the config file to validate. If this isn't specified, @@ -34,13 +35,13 @@ pub fn run(alloc: std.mem.Allocator) !u8 { defer opts.deinit(); { - var iter = try args.argsIterator(alloc); + var iter = try args.argsIterator(alloc, global.args()); defer iter.deinit(); try args.parse(Options, alloc, &opts, &iter); } var buffer: [1024]u8 = undefined; - var stdout_writer = std.fs.File.stdout().writer(&buffer); + var stdout_writer = std.Io.File.stdout().writer(global.io(), &buffer); const stdout = &stdout_writer.interface; const result = runInner(alloc, opts, stdout); try stdout_writer.end(); @@ -58,7 +59,11 @@ fn runInner( // If a config path is passed, validate it, otherwise validate default configs if (opts.@"config-file") |config_path| { var buf: [std.fs.max_path_bytes]u8 = undefined; - const abs_path = try std.fs.cwd().realpath(config_path, &buf); + const abs_path = buf[0..try std.Io.Dir.cwd().realPathFile( + global.io(), + config_path, + &buf, + )]; try cfg.loadFile(alloc, abs_path); try cfg.loadRecursiveFiles(alloc); } else { |
