execute_sudo_command_with_password

Function execute_sudo_command_with_password 

Source
pub fn execute_sudo_command_with_password<S, P>(
    args: &[S],
    password: &str,
    path: P,
) -> Result<(bool, String, String)>
where S: AsRef<OsStr> + Debug, P: AsRef<Path> + Debug,
Expand description

run a sudo command requiring a password (generally to establish the password.) Since I can’t send 2 passwords at a time, it will only work with the sudo password It requires a path to establish CWD.