Merge pull request #15 from utox39/feat/handle-ioctl-error
Feat/handle ioctl error
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user