Merge pull request #15 from utox39/feat/handle-ioctl-error

Feat/handle ioctl error
This commit is contained in:
utox39
2025-09-12 02:42:30 +02:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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 });