Add Sudo type (#221)

* Create `Sudo` type and `SudoKind` enum

* Fix build

* reformat

* Fix choco on windows

* Fix linux

* Fix linux more

* more fix stuff hehe hoho hahaha

* more fix stuff hehe hoho hahaha

Co-authored-by: Thomas Schönauer <37108907+DottoDev@users.noreply.github.com>
This commit is contained in:
Rebecca Turner
2022-11-25 17:19:32 -05:00
committed by GitHub
parent 526c4c9a58
commit b31778bdd8
10 changed files with 157 additions and 89 deletions

View File

@@ -10,6 +10,7 @@ use walkdir::WalkDir;
use crate::command::CommandExt;
use crate::error::TopgradeError;
use crate::execution_context::ExecutionContext;
use crate::sudo::Sudo;
use crate::utils::which;
use crate::{config, Step};
@@ -110,7 +111,7 @@ impl Trizen {
}
pub struct Pacman {
sudo: PathBuf,
sudo: Sudo,
executable: PathBuf,
}
@@ -229,7 +230,7 @@ impl ArchPackageManager for Pamac {
pub struct Aura {
executable: PathBuf,
sudo: PathBuf,
sudo: Sudo,
}
impl Aura {