From fe84bfc0009c81eff6e3620b350aac776a2b4f2b Mon Sep 17 00:00:00 2001 From: r0ptr Date: Fri, 15 Aug 2025 14:53:25 +0200 Subject: [PATCH] Fix lua decompiler invocation so it outputs the result into a file instead of dumping it to stdout --- darkspore_server/source/installer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/darkspore_server/source/installer.cpp b/darkspore_server/source/installer.cpp index c358f5620..16fcc0e96 100644 --- a/darkspore_server/source/installer.cpp +++ b/darkspore_server/source/installer.cpp @@ -104,11 +104,14 @@ void Installer::LoadDarksporeData(std::string darksporeInstallPath, std::string void Installer::RunCommand(const std::string& cmd) { std::filesystem::path log_path = std::filesystem::path("data") / "serverdata" / "debug.log"; - std::string log_cmd = cmd + " >> " + log_path.string() + " 2>&1"; + std::string log_cmd = cmd + " 2>&1"; + std::ofstream log(log_path, std::ios::app); + if (log.is_open()) { + log << log_cmd << std::endl; + } int result = std::system(log_cmd.c_str()); if (result != 0) { - std::ofstream log(log_path, std::ios::app); if (log.is_open()) { log << "Command failed: " << log_cmd << std::endl; }