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 Oct 31, 2024
1 parent f6af620 commit 30e8350
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 @@ -4,6 +4,7 @@
)]

use native_dialog::{MessageDialog, MessageType};
use std::env;
use tauri::{Listener, Manager};
use theseus::prelude::*;

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 30e8350

Please sign in to comment.