Automatically detect gsudo (#469)

This commit is contained in:
Roey Darwish Dror
2020-07-10 11:21:19 +03:00
committed by GitHub
parent 69b9c4b24c
commit 065565240e
5 changed files with 15 additions and 38 deletions

View File

@@ -65,16 +65,11 @@ fn run() -> Result<()> {
let git = git::Git::new();
let mut git_repos = git::Repositories::new(&git);
#[cfg(unix)]
let sudo = utils::sudo();
let run_type = executor::RunType::new(config.dry_run());
#[cfg(unix)]
let ctx = execution_context::ExecutionContext::new(run_type, &sudo, &git, &config, &base_dirs);
#[cfg(not(unix))]
let ctx = execution_context::ExecutionContext::new(run_type, &git, &config, &base_dirs);
let mut runner = runner::Runner::new(&ctx);
#[cfg(feature = "self-update")]