From d5c7dc7de61c2b2ba05b1a101e8554c1cf3e3469 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 27 Apr 2025 11:57:42 +1200 Subject: [PATCH] YAY --- src/server_env.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server_env.cpp b/src/server_env.cpp index 1eb27fb..dc06c3f 100644 --- a/src/server_env.cpp +++ b/src/server_env.cpp @@ -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 &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;