Update system.hpp (#133)

This commit is contained in:
dan_the_3rd
2025-07-28 17:01:05 +08:00
committed by GitHub
parent 8987798502
commit 4b4e4f20dd
+2 -2
View File
@@ -38,8 +38,8 @@ static std::tuple<int, std::string> 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<std::filesystem::path> collect_files(const std::filesystem::path& root) {