From 54328120b53fdcb15d31bcbbba22477f94e6af1a Mon Sep 17 00:00:00 2001 From: AntwortEinesLebens Date: Sun, 2 Feb 2025 00:35:37 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Also=20print=20errors=20fro?= =?UTF-8?q?m=20the=20std=20lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/traces/drivers/byovd.rs | 11 ++++++++--- src/commands/traces/processes/spoofing.rs | 12 +++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/commands/traces/drivers/byovd.rs b/src/commands/traces/drivers/byovd.rs index 9ef40fa..9a11184 100644 --- a/src/commands/traces/drivers/byovd.rs +++ b/src/commands/traces/drivers/byovd.rs @@ -57,10 +57,15 @@ impl Runnable for Byovd { displayer.success("The application has administrator privileges"); displayer.loading("Checking the driver path validity"); - let Ok(driver_exists) = self.driver.try_exists() else { - displayer.failure("Failed to check the existence of the driver path"); + let driver_exists = match self.driver.try_exists() { + Ok(driver_exists) => driver_exists, + Err(error) => { + displayer.failure( + format!("Failed to check the existence of the driver path: {error}").as_str(), + ); - return ExitCode::FAILURE; + return ExitCode::FAILURE; + } }; if !driver_exists || !self.driver.is_file() { diff --git a/src/commands/traces/processes/spoofing.rs b/src/commands/traces/processes/spoofing.rs index f13bab0..7ac0fc4 100644 --- a/src/commands/traces/processes/spoofing.rs +++ b/src/commands/traces/processes/spoofing.rs @@ -39,10 +39,16 @@ impl Runnable for Spoofing { let mut displayer = Displayer::new(); displayer.loading("Checking the executable path validity"); - let Ok(executable_exists) = self.executable.try_exists() else { - displayer.failure("Failed to check the existence of the executable path"); + let executable_exists = match self.executable.try_exists() { + Ok(executable_exists) => executable_exists, + Err(error) => { + displayer.failure( + format!("Failed to check the existence of the executable path: {error}") + .as_str(), + ); - return ExitCode::FAILURE; + return ExitCode::FAILURE; + } }; if !executable_exists || !self.executable.is_file() {