From dc2f694ebeb6ca7171ca073de8c070cfae32f5a3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 17 May 2025 23:12:43 +1200 Subject: [PATCH] . --- source/src/commands/nuke.cpp | 5 +++-- source/src/server_env_manager.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/src/commands/nuke.cpp b/source/src/commands/nuke.cpp index 535a880..5aba69c 100644 --- a/source/src/commands/nuke.cpp +++ b/source/src/commands/nuke.cpp @@ -10,8 +10,6 @@ #include "utils/assert.hpp" -#pragma message ("TODO: Fix issues with Nuke below.") - namespace dropshell { int nuke_handler(const CommandContext& ctx); @@ -67,11 +65,14 @@ int nuke_one(std::string server, std::string service) // otherwise just uninstall. 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, {})) std::cerr << "Warning: Failed to run nuke script: " << service << std::endl; } 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, {})) std::cerr << "Warning: Failed to uninstall service: " << service << std::endl; } diff --git a/source/src/server_env_manager.cpp b/source/src/server_env_manager.cpp index 017a396..0653f16 100644 --- a/source/src/server_env_manager.cpp +++ b/source/src/server_env_manager.cpp @@ -204,7 +204,7 @@ bool server_env_manager::run_remote_template_command(const std::string &service_ if (scommand->get_command_to_run().empty()) 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); }