From e09d125980406fee05c9eeaffa4c95ee36cccbf3 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Fri, 3 Apr 2026 07:12:24 -0700 Subject: [PATCH] Should fix issues on linux --- src-tauri/src/lib.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index f9b25ae..109492c 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -583,7 +583,28 @@ pub fn run() { async fn update(app: tauri::AppHandle) -> tauri_plugin_updater::Result<()> { let window = app.get_webview_window("main").unwrap(); - if let Some(update) = app.updater()?.check().await? { + let target = { + #[cfg(target_os = "linux")] + { + if std::path::Path::new("/etc/debian_version").exists() { + "linux-debian" + } else { + "linux-fedora" + } + } + #[cfg(not(target_os = "linux"))] + { + tauri_plugin_updater::target().unwrap_or("unknown".to_string()) + } + }; + + if let Some(update) = app + .updater_builder() + .target(target) + .build()? + .check() + .await? + { let mut new_url = window.url().unwrap(); new_url.set_path("/update/updating"); window.navigate(new_url).unwrap();