mirror of
https://github.com/NixOS/nix
synced 2025-07-04 23:51:47 +02:00
fix(ssh): log first line of stdout
Spent a while debugging why `nix-copy-closure` wasn't working anymore and it was my shell RC printing something I added for debug. Hopefully this can save someone else some time.
This commit is contained in:
parent
6472c3bf0d
commit
2fb49759b8
1 changed files with 4 additions and 1 deletions
|
@ -114,9 +114,11 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string
|
||||||
reply = readLine(out.readSide.get());
|
reply = readLine(out.readSide.get());
|
||||||
} catch (EndOfFile & e) { }
|
} catch (EndOfFile & e) { }
|
||||||
|
|
||||||
if (reply != "started")
|
if (reply != "started") {
|
||||||
|
printTalkative("SSH stdout first line: %s", reply);
|
||||||
throw Error("failed to start SSH connection to '%s'", host);
|
throw Error("failed to start SSH connection to '%s'", host);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
conn->out = std::move(out.readSide);
|
conn->out = std::move(out.readSide);
|
||||||
conn->in = std::move(in.writeSide);
|
conn->in = std::move(in.writeSide);
|
||||||
|
@ -171,6 +173,7 @@ Path SSHMaster::startMaster()
|
||||||
} catch (EndOfFile & e) { }
|
} catch (EndOfFile & e) { }
|
||||||
|
|
||||||
if (reply != "started") {
|
if (reply != "started") {
|
||||||
|
printTalkative("SSH master stdout first line: %s", reply);
|
||||||
throw Error("failed to start SSH master connection to '%s'", host);
|
throw Error("failed to start SSH master connection to '%s'", host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue