Skip to content

Commit

Permalink
Update to zig master
Browse files Browse the repository at this point in the history
  • Loading branch information
sam701 committed Mar 22, 2024
1 parent 50201f0 commit d8f9321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Printer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn init(file: std.fs.File, color: command.ColorUsage) Self {
.use_color = switch (color) {
.always => true,
.never => false,
.auto => std.os.isatty(file.handle),
.auto => std.io.tty.detectConfig(file) != .no_color,
},
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub fn Parser(comptime Iterator: type) type {

if (opt == &help_option) {
try help.print_command_help(self.app, try self.command_path.toOwnedSlice());
std.os.exit(0);
std.process.exit(0);
}

if (opt.value_ref.value_data.is_bool) {
Expand Down Expand Up @@ -298,7 +298,7 @@ pub fn Parser(comptime Iterator: type) type {
p.format(": ", .{});
p.format(fmt, args);
p.write(&.{'\n'});
std.os.exit(1);
std.process.exit(1);
}

fn find_option_by_name(self: *const Self, option_name: []const u8) *command.Option {
Expand Down

0 comments on commit d8f9321

Please sign in to comment.