aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl/lib/Nix/SSH.pm6
-rwxr-xr-xscripts/build-remote.pl.in2
2 files changed, 5 insertions, 3 deletions
diff --git a/perl/lib/Nix/SSH.pm b/perl/lib/Nix/SSH.pm
index c8792043c..84bff5c78 100644
--- a/perl/lib/Nix/SSH.pm
+++ b/perl/lib/Nix/SSH.pm
@@ -107,11 +107,13 @@ sub writeStrings {
sub connectToRemoteNix {
- my ($sshHost, $sshOpts) = @_;
+ my ($sshHost, $sshOpts, $extraFlags) = @_;
+
+ $extraFlags ||= "";
# Start ‘nix-store --serve’ on the remote host.
my ($from, $to);
- my $pid = open2($from, $to, "ssh $sshHost @{$sshOpts} nix-store --serve --write");
+ my $pid = open2($from, $to, "ssh $sshHost @{$sshOpts} nix-store --serve --write $extraFlags");
# Do the handshake.
my $SERVE_MAGIC_1 = 0x390c9deb; # FIXME
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 687b0e131..c2f1fecd8 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -197,7 +197,7 @@ REQ: while (1) {
@sshOpts = ("-i", $machine->{sshKeys}, "-x");
$hostName = $machine->{hostName};
eval {
- ($from, $to) = connectToRemoteNix($hostName, \@sshOpts);
+ ($from, $to) = connectToRemoteNix($hostName, \@sshOpts, "2>&4");
# FIXME: check if builds are inhibited.
};
last REQ unless $@;