diff --git a/src/suggestions.rs b/src/suggestions.rs index 32fd756..5cf5444 100644 --- a/src/suggestions.rs +++ b/src/suggestions.rs @@ -305,19 +305,15 @@ pub fn run_suggestion(data: &Data, command: &str) -> std::process::ExitStatus { .arg(command) .stdout(stderr()) .stderr(Stdio::inherit()) - .spawn() - .expect("failed to execute process") - .wait() - .unwrap(), + .status() + .expect("failed to execute process"), None => std::process::Command::new(shell) .arg("-c") .arg(command) .stdout(stderr()) .stderr(Stdio::inherit()) - .spawn() - .expect("failed to execute process") - .wait() - .unwrap(), + .status() + .expect("failed to execute process"), } }