From c8a40bedcdd218d981a1cbc67f232a84535af0ed Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sun, 28 Feb 2021 02:38:06 -0700 Subject: Re-use `ssh_addr` --- src/deploy.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/deploy.rs') diff --git a/src/deploy.rs b/src/deploy.rs index fb6ce0a..f560172 100644 --- a/src/deploy.rs +++ b/src/deploy.rs @@ -150,11 +150,11 @@ pub enum ConfirmProfileError { pub async fn confirm_profile( deploy_data: &super::DeployData<'_>, deploy_defs: &super::DeployDefs, - hostname: &str, temp_path: Cow<'_, str>, + ssh_addr: &str, ) -> Result<(), ConfirmProfileError> { let mut ssh_confirm_command = Command::new("ssh"); - ssh_confirm_command.arg(format!("ssh://{}@{}", deploy_defs.ssh_user, hostname)); + ssh_confirm_command.arg(ssh_addr); for ssh_opt in &deploy_data.merged_settings.ssh_opts { ssh_confirm_command.arg(ssh_opt); @@ -330,7 +330,7 @@ pub async fn deploy_profile( info!("Success activating, attempting to confirm activation"); - let c = confirm_profile(deploy_data, deploy_defs, hostname, temp_path).await; + let c = confirm_profile(deploy_data, deploy_defs, temp_path, &ssh_addr).await; recv_activated.await.unwrap(); c?; } -- cgit v1.2.3