fix mailto being parsed after cli

This commit is contained in:
Clément DOUIN 2024-04-20 07:52:22 +02:00
parent 3c417d14eb
commit 30f00d0867
No known key found for this signature in database
GPG Key ID: 353E4A18EE0FAB72
1 changed files with 2 additions and 3 deletions

View File

@ -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 => {