Skip to content

Commit

Permalink
always print install errors
Browse files Browse the repository at this point in the history
  • Loading branch information
daywalker90 committed Feb 25, 2024
1 parent 6a1746e commit aabb153
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions coffee_cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 } => {
Expand Down

0 comments on commit aabb153

Please sign in to comment.