feat: run pre_sudo before pre_commands (#1469)

This commit is contained in:
Andre Toerien
2025-11-11 17:17:00 +02:00
committed by GitHub
parent ec8d30f634
commit bb4afb71e9
2 changed files with 7 additions and 8 deletions

View File

@@ -1607,8 +1607,7 @@ impl Config {
self.config_file.misc.as_ref().and_then(|misc| misc.sudo_command)
}
/// If `true`, `sudo` should be called after `pre_commands` in order to elevate at the
/// start of the session (and not in the middle).
/// If `true`, `sudo -v` should be called to cache credentials at the start of the run
pub fn pre_sudo(&self) -> bool {
self.config_file
.misc