Add sudo_command option (#379)
This allows the user to specify the preferred sudo command to be used instead of the command chosen by Sudo::detect
This commit is contained in:
committed by
GitHub
parent
462016e51e
commit
a3628d0d49
@@ -107,7 +107,7 @@ For more information about this issue see https://askubuntu.com/questions/110969
|
||||
let git = git::Git::new();
|
||||
let mut git_repos = git::Repositories::new(&git);
|
||||
|
||||
let sudo = sudo::Sudo::detect();
|
||||
let sudo = config.sudo_command().map_or_else(sudo::Sudo::detect, sudo::Sudo::new);
|
||||
let run_type = executor::RunType::new(config.dry_run());
|
||||
|
||||
let ctx = execution_context::ExecutionContext::new(run_type, sudo, &git, &config, &base_dirs);
|
||||
|
||||
Reference in New Issue
Block a user