소스 검색

fix: service install failed on macos

MystiPanda 11 달 전
부모
커밋
bd589c4422
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src-tauri/src/core/service.rs

+ 6 - 0
src-tauri/src/core/service.rs

@@ -103,6 +103,12 @@ pub async fn install_service() -> Result<()> {
     if !installer_path.exists() {
         bail!("installer not found");
     }
+
+    let _ = StdCommand::new("chmod")
+        .arg("+x")
+        .arg(installer_path.to_string_lossy().replace(" ", "\\ "))
+        .output();
+
     let shell = installer_path.to_string_lossy().replace(" ", "\\\\ ");
     let command = format!(r#"do shell script "{shell}" with administrator privileges"#);