From 99010664bff8ee5cf0f027719b2b1c8a71752874 Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Tue, 20 Feb 2024 01:37:46 +0100 Subject: [PATCH] fix unix self_update::run --- src/self_update.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/self_update.rs b/src/self_update.rs index b2c3d4b..adda636 100644 --- a/src/self_update.rs +++ b/src/self_update.rs @@ -13,15 +13,15 @@ pub async fn self_update_available() -> bool { } #[cfg(not(windows))] -pub fn run(_update_only: bool) { - if self_update_available() { +pub async fn run(_update_only: bool) { + if self_update_available().await { println!("A new version of the AlterWare launcher is available."); println!( "Download it at {}", github::latest_release_url(GH_OWNER, GH_REPO) ); println!("Launching in 10 seconds.."); - thread::sleep(time::Duration::from_secs(10)); + tokio::time::sleep(tokio::time::Duration::from_secs(10)).await; } }