From 91f505401ef338a04da4a6e7256ea8b801a0a68a Mon Sep 17 00:00:00 2001 From: notgne2 Date: Thu, 14 Jan 2021 12:37:59 -0700 Subject: Only build wait command if magic_rollback is enabled --- src/deploy.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/deploy.rs b/src/deploy.rs index 03c3623..a33721c 100644 --- a/src/deploy.rs +++ b/src/deploy.rs @@ -194,16 +194,6 @@ pub async fn deploy_profile( debug!("Constructed activation command: {}", self_activate_command); - let self_wait_command = build_wait_command(WaitCommandData { - sudo: &deploy_defs.sudo, - closure: &deploy_data.profile.profile_settings.path, - temp_path: &temp_path, - debug_logs: deploy_data.debug_logs, - log_dir: deploy_data.log_dir, - }); - - debug!("Constructed wait command: {}", self_wait_command); - let hostname = match deploy_data.cmd_overrides.hostname { Some(ref x) => x, None => &deploy_data.node.node_settings.hostname, @@ -232,6 +222,16 @@ pub async fn deploy_profile( info!("Success activating, done!"); } else { + let self_wait_command = build_wait_command(WaitCommandData { + sudo: &deploy_defs.sudo, + closure: &deploy_data.profile.profile_settings.path, + temp_path: &temp_path, + debug_logs: deploy_data.debug_logs, + log_dir: deploy_data.log_dir, + }); + + debug!("Constructed wait command: {}", self_wait_command); + let ssh_activate = ssh_activate_command .arg(self_activate_command) .spawn() -- cgit v1.2.3