| 123 | // [3]+: the actual command |
| 124 | |
| 125 | int main(int argc, char** argv) { |
| 126 | std::vector<std::string> args(argv, argv + argc); |
| 127 | auto sep = std::find(begin(args), end(args), separator); |
| 128 | assert(sep - begin(args) == 2 && "Structure differs from expected!"); |
| 129 | |
| 130 | auto num = parse_log_file_arg(args[1]); |
| 131 | |
| 132 | auto cmdline = std::accumulate(++sep, end(args), std::string{}, [] (const std::string& lhs, const std::string& rhs) { |
| 133 | return lhs + ' ' + escape_arg(rhs); |
| 134 | }); |
| 135 | |
| 136 | try { |
| 137 | return exec_cmd(cmdline, num, windowsify_path(catch_path(args[0]))); |
| 138 | } catch (std::exception const& ex) { |
| 139 | std::cerr << "Helper failed with: '" << ex.what() << "'\n"; |
| 140 | return 12; |
| 141 | } |
| 142 | } |
nothing calls this directly
no test coverage detected