diff --git a/build.zig.zon b/build.zig.zon index e96d9ec..e00987f 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -10,7 +10,7 @@ // This is a [Semantic Version](https://semver.org/). // In a future version of Zig it will be used for package deduplication. - .version = "0.21.0", + .version = "0.21.1", // Together with name, this represents a globally unique package // identifier. This field is generated by the Zig toolchain when the diff --git a/src/ascii.zig b/src/ascii.zig index 29848b3..c24fc50 100644 --- a/src/ascii.zig +++ b/src/ascii.zig @@ -95,7 +95,7 @@ pub fn printAsciiAndModules(allocator: std.mem.Allocator, ascii_art_path: ?[]u8, const ascii_art_items = ascii_art_content_list.items; const sys_info_items = sys_info_list.items; - const terminal_size = try utils.getTerminalSize(); + const terminal_size = utils.getTerminalSize() catch utils.TermSize{ .height = 50, .width = 50 }; const terminal_width: usize = @intCast(terminal_size.width); const spacing: usize = 5; diff --git a/src/utils.zig b/src/utils.zig index 53b45b3..b9b455b 100644 --- a/src/utils.zig +++ b/src/utils.zig @@ -43,7 +43,7 @@ pub fn getTerminalSize() !TermSize { } test "getTerminalSize" { - const terminal_size = try getTerminalSize(); + const terminal_size = getTerminalSize() catch TermSize{ .height = 50, .width = 50 }; std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width });