[Backups] Fix database dump error reporting (#3175)

* [Backups] Fix database dump error reporting

* Update database_dump_service.cpp
This commit is contained in:
Chris Miles
2023-04-04 00:14:23 -05:00
committed by GitHub
parent ff2af0c49e
commit 3e30e78158
6 changed files with 71 additions and 13 deletions
+2 -1
View File
@@ -4,7 +4,8 @@
std::string Process::execute(const std::string &cmd)
{
std::shared_ptr<FILE> pipe(popen(cmd.c_str(), "r"), pclose);
std::string command = fmt::format("{} 2>&1", cmd);
std::shared_ptr<FILE> pipe(popen(command.c_str(), "r"), pclose);
if (!pipe) { return "ERROR"; }
char buffer[128];
std::string result;