Crates.io | sudo_prompt |
lib.rs | sudo_prompt |
version | 0.1.0 |
source | src |
created_at | 2023-01-08 06:03:27.803426 |
updated_at | 2023-01-08 06:03:27.803426 |
description | Provides a dialog prompt to run a command using sudo. |
homepage | |
repository | https://github.com/oyyd/sudo-prompt-rs |
max_upload_size | |
id | 753496 |
size | 20,693 |
sudo-prompt-rs
provides a dialog prompt to run a command using sudo
. This is a rewrite of sudo-prompt in Rust.
Mac:
Linux:
Windows: TODO: new images here
use sudo_prompt::{Opts, SudoPrompt};
fn main() {
// TODO provide "new" method
let prompt = SudoPrompt {};
let resp = prompt.exec(&Opts {
cmd: r#"env"#.to_string(),
env: None,
name: None,
}).unwrap();
}
TODO: example here