Skip to content

Commit

Permalink
fix(core): always print install errors
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 authored and vincenzopalazzo committed Feb 26, 2024
1 parent 70de208 commit e14d7d5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions coffee_cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ async fn run(args: CoffeeArgs, mut coffee: CoffeeManager) -> Result<(), CoffeeEr
} else {
None
};
let result = coffee.install(&plugin, verbose, dynamic).await;
if let Some(spinner) = spinner {
if result.is_ok() {
spinner.finish();
} else {
spinner.failed();
match coffee.install(&plugin, verbose, dynamic).await {
Ok(_) => {
spinner.and_then(|spinner| Some(spinner.finish()));
term::success!("Plugin {plugin} Compiled and Installed")
}
Err(err) => {
spinner.and_then(|spinner| Some(spinner.failed()));
term::error(format!("{err}"))
}
} else if result.is_ok() {
term::success!("Plugin {plugin} Compiled and Installed")
}
}
CoffeeCommand::Remove { plugin } => {
Expand Down

0 comments on commit e14d7d5

Please sign in to comment.