| 106 | |
| 107 | |
| 108 | static auto executeScript(const std::string & command, bool throw_on_error = false) |
| 109 | { |
| 110 | auto sh = ShellCommand::execute(command); |
| 111 | |
| 112 | WriteBufferFromFileDescriptor wb_stdout(STDOUT_FILENO); |
| 113 | copyData(sh->out, wb_stdout); |
| 114 | wb_stdout.finalize(); |
| 115 | |
| 116 | WriteBufferFromFileDescriptor wb_stderr(STDERR_FILENO); |
| 117 | copyData(sh->err, wb_stderr); |
| 118 | wb_stderr.finalize(); |
| 119 | |
| 120 | if (throw_on_error) |
| 121 | { |
| 122 | sh->wait(); |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | return sh->tryWait(); |
| 127 | } |
| 128 | |
| 129 | static bool filesEqual(std::string path1, std::string path2) |
| 130 | { |
no test coverage detected