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) {