mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-19 16:25:41 +08:00
fix: escape path space
This commit is contained in:
1 parent
6b21f38047
commit
438106f42e
1 file changed
+1
@@ -25,6 +25,7 @@ pub fn grant_permission(core: String) -> anyhow::Result<()> {
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let output = {
|
||||
let path = path.replace(' ', "\\ "); // 避免路径中有空格
|
||||
let shell = format!("setcap cap_net_bind_service,cap_net_admin=+ep {path}");
|
||||
Command::new("sudo")
|
||||
.arg("sh")
|
||||
|
||||
Reference in new issue
Block a user