Skip to content
Snippets Groups Projects
Unverified Commit fc5ca965 authored by GyDi's avatar GyDi
Browse files

fix: escape path space

parent 9c4a46bc
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment