chore: replace sudo with pkexec execution

This commit is contained in:
huzibaca
2024-10-21 02:31:43 +08:00
parent 90091db3b1
commit babf5d840c
2 changed files with 1 additions and 2 deletions

View File

@@ -108,7 +108,7 @@ pub fn open_file(app: tauri::AppHandle, path: PathBuf) -> Result<()> {
#[cfg(target_os = "linux")]
pub fn linux_elevator() -> String {
use std::process::Command;
match Command::new("which").arg("sudo").output() {
match Command::new("which").arg("pkexec").output() {
Ok(output) => {
if !output.stdout.is_empty() {
// Convert the output to a string slice