From a006cee43ac779dbb245fd4153a5ea67a00c3e7b Mon Sep 17 00:00:00 2001 From: TheAlexDev23 Date: Mon, 14 Oct 2024 13:04:53 +0200 Subject: [PATCH] Mention which command fails to run if it does --- crates/power-daemon/src/helpers/commands.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/power-daemon/src/helpers/commands.rs b/crates/power-daemon/src/helpers/commands.rs index 7a36565..55ea316 100644 --- a/crates/power-daemon/src/helpers/commands.rs +++ b/crates/power-daemon/src/helpers/commands.rs @@ -12,14 +12,14 @@ pub fn command_exists(command: &str) -> bool { .map_or(false, |output| output.status.success()) } -pub fn run_command(command: &str) { - debug!("running: {command}"); +pub fn run_command(command_name: &str) { + debug!("running: {command_name}"); - let mut command = get_command_from_string(command); + let mut command = get_command_from_string(command_name); let output = command .spawn() - .expect("Could not spawn command") + .expect(&format!("Could not spawn command: {command_name}")) .wait_with_output() .expect("Could not wait command");