.
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name 2025-05-17 23:12:43 +12:00
parent 038d08e638
commit dc2f694ebe
2 changed files with 4 additions and 3 deletions

View File

@ -10,8 +10,6 @@
#include "utils/assert.hpp" #include "utils/assert.hpp"
#pragma message ("TODO: Fix issues with Nuke below.")
namespace dropshell { namespace dropshell {
int nuke_handler(const CommandContext& ctx); int nuke_handler(const CommandContext& ctx);
@ -67,11 +65,14 @@ int nuke_one(std::string server, std::string service)
// otherwise just uninstall. // otherwise just uninstall.
if (gTemplateManager().template_command_exists(service_info.template_name, "nuke")) if (gTemplateManager().template_command_exists(service_info.template_name, "nuke"))
{ {
std::cout << "Running nuke script for " << service << " on " << server << std::endl;
if (!server_env.run_remote_template_command(service, "nuke", {}, false, {})) if (!server_env.run_remote_template_command(service, "nuke", {}, false, {}))
std::cerr << "Warning: Failed to run nuke script: " << service << std::endl; std::cerr << "Warning: Failed to run nuke script: " << service << std::endl;
} }
else else
{ {
std::cout << "No nuke script found for " << service << " on " << server << std::endl;
std::cout << "Running uninstall script instead and will clean directories." << std::endl;
if (!server_env.run_remote_template_command(service, "uninstall", {}, false, {})) if (!server_env.run_remote_template_command(service, "uninstall", {}, false, {}))
std::cerr << "Warning: Failed to uninstall service: " << service << std::endl; std::cerr << "Warning: Failed to uninstall service: " << service << std::endl;
} }

View File

@ -204,7 +204,7 @@ bool server_env_manager::run_remote_template_command(const std::string &service_
if (scommand->get_command_to_run().empty()) if (scommand->get_command_to_run().empty())
return false; return false;
cMode mode = (command=="ssh") ? (cMode::Interactive) : cMode::Silent; cMode mode = (command=="ssh") ? (cMode::Interactive) : (silent ? cMode::Silent : cMode::Defaults);
return execute_ssh_command(get_SSH_INFO(), scommand.value(), mode); return execute_ssh_command(get_SSH_INFO(), scommand.value(), mode);
} }