mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
feat: noconfirm mode
This commit is contained in:
parent
885dc081e1
commit
5f521650c8
4 changed files with 48 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ pub const PRIVILEGE_LIST: [&str; 2] = ["sudo", "doas"];
|
|||
pub enum Mode {
|
||||
Suggestion,
|
||||
Echo,
|
||||
NoConfirm,
|
||||
Cnf,
|
||||
}
|
||||
pub struct Init {
|
||||
|
|
@ -391,6 +392,7 @@ pub fn run_mode() -> Mode {
|
|||
Ok(mode) => match mode.as_str() {
|
||||
"suggestion" => Mode::Suggestion,
|
||||
"cnf" => Mode::Cnf,
|
||||
"noconfirm" => Mode::NoConfirm,
|
||||
"echo" => Mode::Echo,
|
||||
_ => {
|
||||
eprintln!("Invalid mode: {}", mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue