From 65a2f1b18dc26e54b6ea1d59331c6873fc0e589b Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Fri, 27 Nov 2020 19:57:05 +0300 Subject: Clean up utils/mod.rs Now that we don't copy `activate` from the same directory as `current_exe`, we can skip the check that the `current_exe` is reachable and in nix store. --- src/utils/mod.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/utils') diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 02ea85b..a960a14 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -203,11 +203,6 @@ pub struct DeployDefs { #[derive(Error, Debug)] pub enum DeployDataDefsError { #[error("Neither `user` nor `sshUser` are set for profile {0} of node {1}")] - NoProfileUser(String, String), - #[error("Error reading current executable path: {0}")] - ExecutablePathNotFound(std::io::Error), - #[error("Executable was not in the Nix store")] - NotNixStored, } impl<'a> DeployData<'a> { @@ -246,13 +241,6 @@ impl<'a> DeployData<'a> { _ => None, }; - let current_exe = - std::env::current_exe().map_err(DeployDataDefsError::ExecutablePathNotFound)?; - - if !current_exe.starts_with("/nix/store/") { - return Err(DeployDataDefsError::NotNixStored); - } - Ok(DeployDefs { ssh_user, profile_user, -- cgit v1.2.3