diff options
author | Alexander Bantyev | 2020-11-27 19:57:05 +0300 |
---|---|---|
committer | notgne2 | 2020-12-02 10:24:23 -0700 |
commit | 65a2f1b18dc26e54b6ea1d59331c6873fc0e589b (patch) | |
tree | b3df88dc59e57586fa850ca28a31f8654098e073 /src/utils | |
parent | 2d0ad40c64dae68295f842daae339d1ccad082b6 (diff) |
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.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/mod.rs | 12 |
1 files changed, 0 insertions, 12 deletions
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, |