refactor: less nesting

This commit is contained in:
iff 2024-10-19 16:48:34 +02:00
parent 76ac397890
commit 78c7d37b92
2 changed files with 31 additions and 27 deletions

View file

@ -29,7 +29,7 @@ pub fn command_output(shell: &str, command: &str) -> String {
Ok(output) => match output.stderr.is_empty() {
true => String::from_utf8_lossy(&output.stdout).to_lowercase(),
false => String::from_utf8_lossy(&output.stderr).to_lowercase(),
}
},
Err(_) => {
use colored::*;
eprintln!("Timeout while executing command: {}", command.red());