fix: try to fix service not started on linux

This commit is contained in:
huzibaca
2024-10-18 07:08:34 +08:00
parent 89ce497431
commit a013fe663c
2 changed files with 2 additions and 19 deletions

View File

@@ -105,21 +105,6 @@ pub fn open_file(app: tauri::AppHandle, path: PathBuf) -> Result<()> {
Ok(())
}
#[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",
}
}
#[macro_export]
macro_rules! error {
($result: expr) => {