diff options
author | Alexander Bantyev | 2021-06-22 14:57:50 +0300 |
---|---|---|
committer | Alexander Bantyev | 2021-06-22 14:57:50 +0300 |
commit | 1d88b8409ed24efd52889c73a0938a2ab29d3022 (patch) | |
tree | 2b059be8e8049cf83190d39ba23f9248c0e4795c /src | |
parent | 1a2d35be27de412bd2c406ed01189dc93ae0985a (diff) |
Cargo fmt
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/activate.rs | 6 | ||||
-rw-r--r-- | src/bin/deploy.rs | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/bin/activate.rs b/src/bin/activate.rs index 6e18652..9cf8819 100644 --- a/src/bin/activate.rs +++ b/src/bin/activate.rs @@ -390,7 +390,11 @@ pub async fn activate( debug!("Running activation script"); - let activation_location = 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) diff --git a/src/bin/deploy.rs b/src/bin/deploy.rs index 4419ef1..7f6fd20 100644 --- a/src/bin/deploy.rs +++ b/src/bin/deploy.rs @@ -560,7 +560,8 @@ async fn run_deploy( // Rollbacks adhere to the global seeting to auto_rollback and secondary // the profile's configuration for (_, deploy_data, deploy_defs) in &parts { - if let Err(e) = deploy::deploy::deploy_profile(deploy_data, deploy_defs, dry_activate).await { + if let Err(e) = deploy::deploy::deploy_profile(deploy_data, deploy_defs, dry_activate).await + { error!("{}", e); if dry_activate { info!("dry run, not rolling back"); @@ -613,11 +614,10 @@ async fn run() -> Result<(), RunError> { deploy::LoggerType::Deploy, )?; - let deploys = opts.clone().targets.unwrap_or_else(|| { - opts.clone() - .target - .unwrap_or(Some(vec![".".to_string()])) - }); + let deploys = opts + .clone() + .targets + .unwrap_or_else(|| vec![opts.clone().target.unwrap_or(".".to_string())]); let deploy_flakes: Vec<DeployFlake> = deploys .iter() |