From 30f00d0867bc0569c1ad7ec27a394fe6a0b03796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Sat, 20 Apr 2024 07:52:22 +0200 Subject: [PATCH] fix mailto being parsed after cli --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index bd49baaa..e14db80e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,12 +17,9 @@ async fn main() -> Result<()> { env::set_var("RUST_LOG", "trace"); } } - let cli = Cli::parse(); let filter = himalaya::tracing::install()?; - let mut printer = StdoutPrinter::new(cli.output, cli.color); - // if the first argument starts by "mailto:", execute straight the // mailto message command let mailto = std::env::args() @@ -38,6 +35,8 @@ async fn main() -> Result<()> { .await; } + let cli = Cli::parse(); + let mut printer = StdoutPrinter::new(cli.output, cli.color); let mut res = match cli.command { Some(cmd) => cmd.execute(&mut printer, cli.config_paths.as_ref()).await, None => {