From ef20fa3aa2e1b694390e18818cc06717b8d5b49e Mon Sep 17 00:00:00 2001 From: skyline Date: Wed, 10 May 2023 01:13:52 +0200 Subject: [PATCH] Prevent App from crashing --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/behind/cli.rs | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b3946bc..31be231 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -408,7 +408,7 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "haxrs" -version = "0.1.1" +version = "0.1.2" dependencies = [ "chrono", "clearscreen", diff --git a/Cargo.toml b/Cargo.toml index 680de4d..1c7d539 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "haxrs" -version = "0.1.1" +version = "0.1.2" edition = "2021" authors = ["skyline "] license-file = "LICENSE" diff --git a/src/behind/cli.rs b/src/behind/cli.rs index 8b8717e..e1913b9 100644 --- a/src/behind/cli.rs +++ b/src/behind/cli.rs @@ -26,7 +26,13 @@ pub enum Command { fn menu_table_select() { clear_terminal().unwrap(); print_login_logo(); - menu_table().unwrap(); + match menu_table() { + Ok(_) => {} + Err(e) => { + error_msg(&format!("Failed to print menu table: {}", e)); + std::process::exit(1); + } + } } pub fn command_input() -> Result {