From 30e83503af2fcc53801755b4081d142901044701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Ellil=C3=A4?= Date: Tue, 10 Sep 2024 20:04:52 +0300 Subject: [PATCH] Allow skipping updater at runtime with an environmental variable --- apps/app/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/app/src/main.rs b/apps/app/src/main.rs index 667a28130..699f17af7 100644 --- a/apps/app/src/main.rs +++ b/apps/app/src/main.rs @@ -4,6 +4,7 @@ )] use native_dialog::{MessageDialog, MessageType}; +use std::env; use tauri::{Listener, Manager}; use theseus::prelude::*; @@ -28,7 +29,12 @@ async fn initialize_state(app: tauri::AppHandle) -> api::Result<()> { theseus::EventState::init(app.clone()).await?; #[cfg(feature = "updater")] - { + 'updater: { + if env::var("MODRINTH_EXTERNAL_UPDATE_PROVIDER").is_ok() { + State::init().await?; + break 'updater; + } + use tauri_plugin_updater::UpdaterExt; let updater = app.updater_builder().build()?;