From 4098bf73bc811a7307613c39bd0cf0e684cb83a6 Mon Sep 17 00:00:00 2001 From: "Jason R. McNeil" Date: Sun, 14 Mar 2021 22:20:47 -0700 Subject: [PATCH] Makes SSH options available to nix-copy-closure --- src/nix/host/ssh.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nix/host/ssh.rs b/src/nix/host/ssh.rs index ac81cc3..bd3dc2d 100644 --- a/src/nix/host/ssh.rs +++ b/src/nix/host/ssh.rs @@ -147,6 +147,9 @@ impl Ssh { } fn nix_copy_closure(&self, path: &StorePath, direction: CopyDirection, options: CopyOptions) -> Command { + let ssh_options = self.ssh_options(); + let ssh_options_str = ssh_options.join(" "); + let mut command = Command::new("nix-copy-closure"); match direction { CopyDirection::ToRemote => { @@ -170,7 +173,8 @@ impl Ssh { command .arg(&self.ssh_target()) - .arg(path.as_path()); + .arg(path.as_path()) + .env("NIX_SSHOPTS", ssh_options_str); command }