diff options
author | notgne2 | 2021-01-14 12:37:59 -0700 |
---|---|---|
committer | notgne2 | 2021-01-14 12:37:59 -0700 |
commit | 91f505401ef338a04da4a6e7256ea8b801a0a68a (patch) | |
tree | 3a2a463457c127ac6516dd5eda9e25ce9dce25b4 /src/deploy.rs | |
parent | 48095042f24321d2a8e158bf8c08f9b800d6cb0e (diff) |
Only build wait command if magic_rollback is enabled
Diffstat (limited to '')
-rw-r--r-- | src/deploy.rs | 20 |
1 files changed, 10 insertions, 10 deletions
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() |