diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index d2e489f..b8f4852 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -46,16 +46,14 @@ namespace hack::utils } } - inline std::string exec(const std::string& cmd) + inline std::string unix_cmd(const std::string& cmd) { std::string result; - std::array buffer; + std::array buffer; std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); if (!pipe) - { throw std::runtime_error("bash cmd failed"); - } while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {