Skip to content
Snippets Groups Projects
Commit d1b238ec authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

Simplify

parent 2da4c610
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment