From 6fe7be191f2a22450710d415657e401255b9c7c5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 16 Dec 2024 07:12:05 +0000 Subject: [PATCH] fix: install color_eyre error handler in main This puts it outside of any tests, as running this in parallel will panic. --- src/lib.rs | 2 -- src/main.rs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 13121f8..b1c5b6c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,8 +96,6 @@ impl FullCtx { #[cfg_attr(test, mutants::skip)] pub async fn run(ctx: &Ctx) -> color_eyre::Result<()> { - color_eyre::install()?; - let commands = Commands::parse(); if commands.log { tracing::subscriber::set_global_default( diff --git a/src/main.rs b/src/main.rs index 7cbe615..6a7ddc4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,5 +6,6 @@ use trello_to_deck::{run, Ctx}; #[tokio::main] #[cfg_attr(test, mutants::skip)] async fn main() -> Result<()> { + color_eyre::install()?; run(&Ctx::from(std::env::current_dir()?)).await }