diff --git a/coffee_cmd/src/main.rs b/coffee_cmd/src/main.rs index d5708fa..e23e74a 100644 --- a/coffee_cmd/src/main.rs +++ b/coffee_cmd/src/main.rs @@ -27,14 +27,20 @@ async fn run(args: CoffeeArgs, mut coffee: CoffeeManager) -> Result<(), CoffeeEr None }; let result = coffee.install(&plugin, verbose, dynamic).await; - if let Some(spinner) = spinner { - if result.is_ok() { - spinner.finish(); - } else { - spinner.failed(); + match result { + Ok(_) => { + if let Some(spinner) = spinner { + spinner.finish(); + } else { + term::success!("Plugin {plugin} Compiled and Installed") + } + } + Err(err) => { + if let Some(spinner) = spinner { + spinner.failed(); + } + term::error(format!("{err}")) } - } else if result.is_ok() { - term::success!("Plugin {plugin} Compiled and Installed") } } CoffeeCommand::Remove { plugin } => {