return r;
}
-static int pakfire_parser_command_logger(Pakfire pakfire, void* data,
- int priority, const char* line, size_t length) {
- char** output = (char**)data;
-
- // Append output
- asprintf(output, "%s%s", (output && *output) ? *output : "", line);
-
- return 0;
-}
-
static int pakfire_parser_expand_commands(PakfireParser parser, char** buffer) {
int r = 0;
PCRE2_UCHAR* command = NULL;
// Execute the command inside the Pakfire environment
r = pakfire_execute(parser->pakfire, argv, NULL, 0,
- pakfire_parser_command_logger, &output);
+ pakfire_execute_capture_stdout, &output);
if (r) {
// Just log this and continue
DEBUG(parser->pakfire, "Command '%s' failed with return code %d\n", command, r);