diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-03-20T14·17+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-03-20T14·25+0100 |
commit | 1aca195e52d4fbf76908e6588b55ed8b5b25cfc8 (patch) | |
tree | 54c34371afebf63b886d3f5a9e747d5d237e0ab7 /src/libstore | |
parent | 78d0c72b52835161fd15058b111aa05d69ce062b (diff) |
Hack to get SSH error messages from build-remote
E.g. cannot build on 'ssh://mac1': cannot connect to 'mac1': bash: nix-store: command not found cannot build on 'ssh://mac2': cannot connect to 'mac2': Host key verification failed. cannot build on 'ssh://mac3': cannot connect to 'mac3': Received disconnect from 213... port 6001:2: Too many authentication failures Authentication failed.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index b8613427e0fa..5c548755c65a 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -652,6 +652,11 @@ HookInstance::HookInstance() if (dup2(builderOut.writeSide.get(), 4) == -1) throw SysError("dupping builder's stdout/stderr"); + /* Hack: pass the read side of that fd to allow build-remote + to read SSH error messages. */ + if (dup2(builderOut.readSide.get(), 5) == -1) + throw SysError("dupping builder's stdout/stderr"); + Strings args = { baseNameOf(settings.buildHook), std::to_string(verbosity), |