From 5d5da4898d41cefd1f79c4cf6dd451405ffb8996 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Thu, 29 Apr 2021 17:34:24 -0700 Subject: Use correct path to `deploy-rs-activate` binary when using `dry_activate` Signed-off-by: Oleg Pykhalov --- src/bin/activate.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/bin/activate.rs') diff --git a/src/bin/activate.rs b/src/bin/activate.rs index da53174..d17f3a8 100644 --- a/src/bin/activate.rs +++ b/src/bin/activate.rs @@ -377,10 +377,12 @@ pub async fn activate( debug!("Running activation script"); - let activate_status = match Command::new(format!("{}/deploy-rs-activate", profile_path)) - .env("PROFILE", if dry_activate { &closure } else { &profile_path }) + let activation_location = if dry_activate { &closure } else { &profile_path }; + + let activate_status = match Command::new(format!("{}/deploy-rs-activate", activation_location)) + .env("PROFILE", activation_location) .env("DRY_ACTIVATE", if dry_activate { "1" } else { "0" }) - .current_dir(if dry_activate { &closure } else { &profile_path }) + .current_dir(activation_location) .status() .await .map_err(ActivateError::RunActivateError) -- cgit v1.2.3