test(utils): handle IoctlFailed error using default values
This commit is contained in:
@@ -43,7 +43,7 @@ pub fn getTerminalSize() !TermSize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test "getTerminalSize" {
|
test "getTerminalSize" {
|
||||||
const terminal_size = try getTerminalSize();
|
const terminal_size = try getTerminalSize() catch TermSize{ 50, 50 };
|
||||||
|
|
||||||
std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width });
|
std.debug.print("Height: {}, Width {}\n", .{ terminal_size.height, terminal_size.width });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user