SSHMaster: Optionally pass -v to ssh

This commit is contained in:
Eelco Dolstra 2018-03-20 15:30:55 +01:00
parent 1aca195e52
commit 21ebf6a160
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -49,6 +49,8 @@ std::unique_ptr<SSHMaster::Connection> SSHMaster::startCommand(const std::string
addCommonSSHOpts(args);
if (socketPath != "")
args.insert(args.end(), {"-S", socketPath});
if (verbosity >= lvlChatty)
args.push_back("-v");
args.push_back(command);
execvp(args.begin()->c_str(), stringsToCharPtrs(args).data());
@ -93,6 +95,8 @@ Path SSHMaster::startMaster()
, "-o", "LocalCommand=echo started"
, "-o", "PermitLocalCommand=yes"
};
if (verbosity >= lvlChatty)
args.push_back("-v");
addCommonSSHOpts(args);
execvp(args.begin()->c_str(), stringsToCharPtrs(args).data());