mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 09:58:32 +08:00
1 parent
6ab7131378
commit
b5a26941ef
1 file changed
+1
-1
@@ -30,7 +30,7 @@ pub struct JsonResponse {
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
pub fn sudo(passwd: &String, cmd: String) -> StdCommand {
|
||||
let shell = format!("echo {} | sudo -S {}", passwd, cmd);
|
||||
let shell = format!("echo \"{}\" | sudo -S {}", passwd, cmd);
|
||||
let mut command = StdCommand::new("bash");
|
||||
command.arg("-c").arg(shell);
|
||||
command
|
||||
|
||||
Reference in new issue
Block a user