Update distant cli error output to be more verbose for anyhow

pull/219/head
Chip Senkbeil 10 months ago
parent b793932f86
commit df3d771205
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

@ -114,3 +114,19 @@ impl fmt::Display for Version {
write!(f, "{}", self.inner)
}
}
impl From<semver::Version> for Version {
/// Creates a new [`Version`] using the major, minor, and patch information from
/// [`semver::Version`].
fn from(version: semver::Version) -> Self {
let mut this = Self::new(version.major, version.minor, version.patch);
this.inner = version;
this
}
}
impl From<Version> for semver::Version {
fn from(version: Version) -> Self {
version.inner
}
}

@ -122,7 +122,7 @@ impl Termination for MainResult {
CliError::Exit(code) => ExitCode::from(code),
CliError::Error(x) => {
match self.format {
Format::Shell => eprintln!("{x}"),
Format::Shell => eprintln!("{x:?}"),
Format::Json => println!(
"{}",
serde_json::to_string(&serde_json::json!({

Loading…
Cancel
Save