diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index ecc5728..d2e489f 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -46,11 +46,11 @@ namespace hack::utils } } - inline std::string exec(const char* cmd) + inline std::string exec(const std::string& cmd) { std::string result; std::array buffer; - std::unique_ptr pipe(popen(cmd, "r"), pclose); + std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); if (!pipe) {