generated from PlexSheep/rs-base
more print error
This commit is contained in:
parent
e7ab89f050
commit
411ded1395
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue