diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-12-13T11·53+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-10T08·45+0200 |
commit | 6d01e9a623774fbf7ec537ac4278924d5b1f21f8 (patch) | |
tree | 21c7d9b5a19e3e42285e9a643c0d4b6ec5b59cf3 /src/libstore/ssh.cc | |
parent | 7afd8321edbf94d19caa76b668133ae3d0e58eb3 (diff) |
Simplify
(cherry picked from commit d1b238ec3cd74d652af46f577f992c9a44ac8e32)
Diffstat (limited to 'src/libstore/ssh.cc')
-rw-r--r-- | src/libstore/ssh.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libstore/ssh.cc b/src/libstore/ssh.cc index 2533e26e8925..eb29c57bcaa2 100644 --- a/src/libstore/ssh.cc +++ b/src/libstore/ssh.cc @@ -47,13 +47,10 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string throw SysError("duping over stderr"); Strings args; - const char * execInto; if (fakeSSH) { - execInto = "bash"; args = { "bash", "-c" }; } else { - execInto = "ssh"; args = { "ssh", host.c_str(), "-x", "-a" }; addCommonSSHOpts(args); if (socketPath != "") @@ -66,7 +63,7 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string execvp(args.begin()->c_str(), stringsToCharPtrs(args).data()); // could not exec ssh/bash - throw SysError("Failed to exec into %s. Is it in PATH?", execInto); + throw SysError("unable to execute '%s'", args.front()); }); @@ -112,7 +109,7 @@ Path SSHMaster::startMaster() addCommonSSHOpts(args); execvp(args.begin()->c_str(), stringsToCharPtrs(args).data()); - throw SysError("Failed to exec into ssh. Is it in PATH?"); + throw SysError("unable to execute '%s'", args.front()); }); out.writeSide = -1; |