From 54f1c98e09c49c891ed9c301bceb4bb339acb06f Mon Sep 17 00:00:00 2001 From: Michal Trybus Date: Thu, 2 Apr 2026 18:29:39 +0200 Subject: [PATCH] Fix miette pretty format broken by rust's "Error: " prefix --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index bd21347..eb0f18a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -52,7 +52,14 @@ use restack::create_todo; #[allow(unused_imports)] use miette::Context; -fn main() -> miette::Result<()> { +fn main() { + if let Err(error) = run() { + eprint!("{error:?}"); + std::process::exit(1); + } +} + +fn run() -> miette::Result<()> { let opts = Opts::parse(); install_tracing(&opts.log)?;