Skip to content

Commit

Permalink
Allow skipping updater at runtime with an environmental variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Chicken committed Sep 10, 2024
1 parent 0221034 commit e042f5a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use native_dialog::{MessageDialog, MessageType};
use tauri::{Listener, Manager};
use theseus::prelude::*;
use std::env;

mod api;
mod error;
Expand All @@ -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()?;
Expand Down

0 comments on commit e042f5a

Please sign in to comment.