mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
@@ -30,7 +30,7 @@ pub struct JsonResponse {
|
|||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
pub fn sudo(passwd: &String, cmd: String) -> StdCommand {
|
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");
|
let mut command = StdCommand::new("bash");
|
||||||
command.arg("-c").arg(shell);
|
command.arg("-c").arg(shell);
|
||||||
command
|
command
|
||||||
|
|||||||
Reference in New Issue
Block a user