From 5f694ef481610e8c4c77bb963b49e2d3b0d4db3c Mon Sep 17 00:00:00 2001 From: Nick Hassan Date: Sat, 3 Feb 2024 15:12:36 +1030 Subject: add support for entering password for sudo --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 663e26e..61fac6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -165,6 +165,7 @@ pub struct CmdOverrides { pub confirm_timeout: Option, pub activation_timeout: Option, pub sudo: Option, + pub interactive_sudo: Option, pub dry_activate: bool, pub remote_build: bool, } @@ -334,6 +335,7 @@ pub struct DeployDefs { pub ssh_user: String, pub profile_user: String, pub sudo: Option, + pub sudo_password: Option, } enum ProfileInfo { ProfilePath { @@ -369,6 +371,7 @@ impl<'a> DeployData<'a> { ssh_user, profile_user, sudo, + sudo_password: None, }) } @@ -448,6 +451,9 @@ pub fn make_deploy_data<'a, 's>( if let Some(activation_timeout) = cmd_overrides.activation_timeout { merged_settings.activation_timeout = Some(activation_timeout); } + if let Some(interactive_sudo) = cmd_overrides.interactive_sudo { + merged_settings.interactive_sudo = Some(interactive_sudo); + } DeployData { node_name, -- cgit v1.2.3