Skip to main content

execute_with_sudo

Function execute_with_sudo 

Source
pub fn execute_with_sudo(command: &str, args: &[&str]) -> Result<Output>
Expand description

Execute a command with sudo if not already root This function handles terminal raw mode properly for TUI applications It assumes sudo credentials are already cached (via password dialog or sudo -v)