Explorar o código

fix: service install path

MystiPanda hai 1 ano
pai
achega
41762be3a5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src-tauri/src/core/service.rs

+ 1 - 1
src-tauri/src/core/service.rs

@@ -102,7 +102,7 @@ pub async fn install_service() -> Result<()> {
     if !installer_path.exists() {
     if !installer_path.exists() {
         bail!("installer not found");
         bail!("installer not found");
     }
     }
-    let shell = installer_path.to_string_lossy();
+    let shell = installer_path.to_string_lossy().replace(" ", "\\\\ ");
     let command = format!(r#"do shell script "{shell}" with administrator privileges"#);
     let command = format!(r#"do shell script "{shell}" with administrator privileges"#);
 
 
     let status = StdCommand::new("osascript")
     let status = StdCommand::new("osascript")