mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-05 11:40:04 +00:00
Don’t print "Fatal error" for UserAbort
This commit is contained in:
parent
d21c4a0875
commit
7f0c818313
2 changed files with 3 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::process::{ExitCode, Termination};
|
||||
|
||||
use log::warn;
|
||||
use log::{error, warn};
|
||||
use miette::{Diagnostic, Report};
|
||||
use thiserror::Error;
|
||||
|
||||
|
@ -189,6 +189,7 @@ impl Termination for BinstallError {
|
|||
if let BinstallError::UserAbort = self {
|
||||
warn!("Installation cancelled");
|
||||
} else {
|
||||
error!("Fatal error:");
|
||||
eprintln!("{:?}", Report::new(self));
|
||||
}
|
||||
|
||||
|
|
|
@ -93,10 +93,7 @@ impl Termination for MainExit {
|
|||
info!("Installation completed in {spent:?}");
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
Self::Error(err) => {
|
||||
error!("Fatal error:");
|
||||
err.report()
|
||||
}
|
||||
Self::Error(err) => err.report(),
|
||||
Self::Report(err) => {
|
||||
error!("Fatal error:");
|
||||
eprintln!("{err:?}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue