From b4c6db7cda8fa2b723092ccb26a0a95963ec86e6 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Fri, 5 Aug 2022 00:13:35 +1000 Subject: [PATCH] Refactor & Optimize: Launch target detection as soon as possible Signed-off-by: Jiahao XU --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index cb7bc8de..e8cb2191 100644 --- a/src/main.rs +++ b/src/main.rs @@ -291,6 +291,9 @@ async fn entry(jobserver_client: LazyJobserverClient) -> Result<()> { bin_dir: opts.bin_dir.take(), }; + // Launch target detection + let desired_targets = get_desired_targets(&opts.targets); + // Initialize reqwest client let client = create_reqwest_client(opts.secure, opts.min_tls_version.map(|v| v.into()))?; @@ -318,9 +321,6 @@ async fn entry(jobserver_client: LazyJobserverClient) -> Result<()> { // Initialize UI thread let mut uithread = UIThread::new(!opts.no_confirm); - // Launch target detection - let desired_targets = get_desired_targets(&opts.targets); - // Compute install directory let (install_path, custom_install_path) = get_install_path(opts.install_path.as_deref()); let install_path = install_path.ok_or_else(|| {