From 4b4e4f20dd28f6fcfb67a973f2ca34913e551bd4 Mon Sep 17 00:00:00 2001 From: dan_the_3rd <43445237+danthe3rd@users.noreply.github.com> Date: Mon, 28 Jul 2025 11:01:05 +0200 Subject: [PATCH] Update system.hpp (#133) --- csrc/utils/system.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csrc/utils/system.hpp b/csrc/utils/system.hpp index 91dee12..4835640 100644 --- a/csrc/utils/system.hpp +++ b/csrc/utils/system.hpp @@ -38,8 +38,8 @@ static std::tuple call_external_command(std::string command) { std::string output; while (fgets(buffer.data(), buffer.size(), pipe.get())) output += buffer.data(); - const auto& exit_code = WEXITSTATUS(pclose(pipe.release())); - return {exit_code, output}; + const auto exit_code = pclose(pipe.release()); + return {WEXITSTATUS(exit_code), output}; } static std::vector collect_files(const std::filesystem::path& root) {