Skip to content

Commit

Permalink
Mention which command fails to run if it does
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlexDev23 committed Oct 14, 2024
1 parent abf4674 commit a006cee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/power-daemon/src/helpers/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"))

Check failure on line 22 in crates/power-daemon/src/helpers/commands.rs

View workflow job for this annotation

GitHub Actions / cargo check and clippy

use of `expect` followed by a function call
.wait_with_output()
.expect("Could not wait command");

Expand Down

0 comments on commit a006cee

Please sign in to comment.