diff options
author | notgne2 | 2021-04-29 17:34:24 -0700 |
---|---|---|
committer | Oleg Pykhalov | 2021-04-30 10:47:46 +0300 |
commit | 5d5da4898d41cefd1f79c4cf6dd451405ffb8996 (patch) | |
tree | 993a8d8aa793a0065c64c7326ed1ff15a5d00097 /src/bin/activate.rs | |
parent | 920c9d2ed4034e2200c948868c7bd510e58b1371 (diff) |
Use correct path to `deploy-rs-activate` binary when using `dry_activate`
Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | src/bin/activate.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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) |