YAY
This commit is contained in:
parent
898cc97bae
commit
d5c7dc7de6
@ -64,7 +64,7 @@ std::string server_env::get_variable(const std::string& name) const {
|
||||
std::string server_env::construct_ssh_cmd() const {
|
||||
std::stringstream ssh_cmd;
|
||||
ssh_cmd << "ssh -p " << get_SSH_PORT() << " "
|
||||
<< get_SSH_USER() << "@" << get_SSH_HOST() << " ";
|
||||
<< get_SSH_USER() << "@" << get_SSH_HOST();
|
||||
return ssh_cmd.str();
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ bool server_env::check_remote_items_exist(const std::vector<std::string> &file_p
|
||||
}
|
||||
|
||||
bool server_env::execute_ssh_command(const sCommand& command) const {
|
||||
std::string full_cmd = construct_ssh_cmd() + quote(command.construct_safecmd());
|
||||
std::string full_cmd = construct_ssh_cmd() + " " + quote(command.construct_safecmd());
|
||||
bool okay = execute_local_command(full_cmd);
|
||||
if (!okay) {
|
||||
std::cerr << "Error: Failed to execute command on remote server: " << full_cmd << std::endl;
|
||||
@ -133,7 +133,7 @@ bool server_env::execute_ssh_command(const sCommand& command) const {
|
||||
|
||||
bool server_env::execute_ssh_command_and_capture_output(const sCommand& command, std::string &output) const
|
||||
{
|
||||
std::string full_cmd = construct_ssh_cmd() + quote(command.construct_safecmd());
|
||||
std::string full_cmd = construct_ssh_cmd() + " " + quote(command.construct_safecmd());
|
||||
bool okay = execute_local_command_and_capture_output(full_cmd, output);
|
||||
if (!okay) {
|
||||
std::cerr << "Error: Failed to execute command on remote server: " << full_cmd << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user