From 411ded139558cd7b95c5fb2b28690b862344a2aa Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 26 Apr 2024 14:24:23 +0200 Subject: [PATCH] more print error --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index a0477a9..da0f668 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +use std::error::Error as _; + use autocrate::{ changelog::*, config::{ @@ -9,7 +11,7 @@ use autocrate::{ release::release, serverapi::ApiCollection, }; -use libpt::log::error; +use libpt::log::{debug, error}; #[tokio::main] async fn main() -> Result<()> { @@ -31,14 +33,14 @@ async fn main() -> Result<()> { let mut apis = ApiCollection::build(&cfg).await?; match release(&cfg, &mut apis).await { Ok(_) => None, - Err(err) => Some(err) + Err(err) => Some(err), } } Commands::Publish { .. } => { // TODO: check if repo is dirty and create a commit with a given option match publish(&cfg).await { Ok(_) => None, - Err(err) => Some(err) + Err(err) => Some(err), } } Commands::Version {} => { @@ -54,6 +56,7 @@ async fn main() -> Result<()> { }; if let Some(err) = status { error!("{err}"); + debug!("{:#?}", err.source()); } Ok(()) }