fix: try to fix install service

This commit is contained in:
MystiPanda committed 2024-07-16 12:07:23 +08:00
1 parent 3f321c8801
commit f2372a13e8
12 files changed
+219 -103

No files matched your search

-1
View File
@@ -4,4 +4,3 @@ pub mod init;
pub mod resolve;
pub mod server;
pub mod tmpl;
pub mod unix_helper;
+1
View File
@@ -8,6 +8,7 @@ use serde_yaml::Mapping;
use std::net::TcpListener;
use tauri::api::notification;
use tauri::{App, AppHandle, Manager};
#[cfg(not(target_os = "linux"))]
use window_shadows::set_shadow;
pub static VERSION: OnceCell<String> = OnceCell::new();
-14
View File
@@ -1,14 +0,0 @@
#[cfg(target_os = "linux")]
pub fn linux_elevator() -> &'static str {
use std::process::Command;
match Command::new("which").arg("pkexec").output() {
Ok(output) => {
if output.stdout.is_empty() {
"sudo"
} else {
"pkexec"
}
}
Err(_) => "sudo",
}
}