mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
refactor: less nesting
This commit is contained in:
parent
76ac397890
commit
78c7d37b92
2 changed files with 31 additions and 27 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue