mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: service install failed on macos
This commit is contained in:
parent
f85f7758e6
commit
bd589c4422
|
@ -103,6 +103,12 @@ pub async fn install_service() -> Result<()> {
|
||||||
if !installer_path.exists() {
|
if !installer_path.exists() {
|
||||||
bail!("installer not found");
|
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 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"#);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user