aboutsummaryrefslogtreecommitdiff
path: root/src/utils/deploy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/deploy.rs')
-rw-r--r--src/utils/deploy.rs26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/utils/deploy.rs b/src/utils/deploy.rs
index 9c258fd..1abae64 100644
--- a/src/utils/deploy.rs
+++ b/src/utils/deploy.rs
@@ -6,30 +6,6 @@ use super::data;
use tokio::process::Command;
-fn deploy_path_to_activate_path_str(
- deploy_path: &std::path::Path,
-) -> Result<String, Box<dyn std::error::Error>> {
- Ok(format!(
- "{}/activate",
- deploy_path
- .parent()
- .ok_or("Deploy path too short")?
- .to_str()
- .ok_or("Deploy path is not valid utf8")?
- .to_owned()
- ))
-}
-
-#[test]
-fn test_activate_path_generation() {
- match deploy_path_to_activate_path_str(&std::path::PathBuf::from(
- "/blah/blah/deploy-rs/bin/deploy",
- )) {
- Err(_) => panic!(""),
- Ok(x) => assert_eq!(x, "/blah/blah/deploy-rs/bin/activate".to_string()),
- }
-}
-
fn build_activate_command(
activate_path_str: String,
sudo: &Option<String>,
@@ -105,7 +81,7 @@ pub async fn deploy_profile(
profile_name, node_name
);
- let activate_path_str = deploy_path_to_activate_path_str(&deploy_data.current_exe)?;
+ let activate_path_str = super::deploy_path_to_activate_path_str(&deploy_data.current_exe)?;
let self_activate_command = build_activate_command(
activate_path_str,