From 12db69407ecccd0c56691475be5da5165d857ce4 Mon Sep 17 00:00:00 2001 From: huzibaca Date: Thu, 10 Oct 2024 02:21:22 +0800 Subject: [PATCH] chore: update --- src-tauri/src/core/core.rs | 2 -- src-tauri/src/core/service.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src-tauri/src/core/core.rs b/src-tauri/src/core/core.rs index 3acc03e2..1013d3a5 100644 --- a/src-tauri/src/core/core.rs +++ b/src-tauri/src/core/core.rs @@ -72,7 +72,6 @@ impl CoreManager { log::debug!("core is not running"); return Ok(()); } - println!("stop core"); // 关闭tun模式 let mut disable = Mapping::new(); @@ -93,7 +92,6 @@ impl CoreManager { /// 启动核心 pub async fn start_core(&self) -> Result<()> { - println!("start core"); let mut running = self.running.lock().await; if *running { log::debug!("core is running"); diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index 222d0ca4..3df84e2b 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -150,7 +150,7 @@ pub async fn reinstall_service() -> Result<()> { let install_shell: String = installer_path.to_string_lossy().replace(" ", "\\\\ "); let uninstall_shell: String = uninstall_path.to_string_lossy().replace(" ", "\\\\ "); let command = format!( - r#"do shell script "{uninstall_shell} && {install_shell}" with administrator privileges"# + r#"do shell script "sudo {uninstall_shell} && sudo {install_shell}" with administrator privileges"# ); let status = StdCommand::new("osascript")