Automatically detect gsudo (#469)
This commit is contained in:
committed by
GitHub
parent
69b9c4b24c
commit
065565240e
@@ -14,7 +14,6 @@ pub struct ExecutionContext<'a> {
|
||||
}
|
||||
|
||||
impl<'a> ExecutionContext<'a> {
|
||||
#[cfg(unix)]
|
||||
pub fn new(
|
||||
run_type: RunType,
|
||||
sudo: &'a Option<PathBuf>,
|
||||
@@ -31,17 +30,6 @@ impl<'a> ExecutionContext<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
pub fn new(run_type: RunType, git: &'a Git, config: &'a Config, base_dirs: &'a BaseDirs) -> ExecutionContext<'a> {
|
||||
ExecutionContext {
|
||||
run_type,
|
||||
sudo: &None,
|
||||
config,
|
||||
git,
|
||||
base_dirs,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn run_type(&self) -> RunType {
|
||||
self.run_type
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user