parent
184a1c5281
commit
8d355f8255
@ -107,11 +107,15 @@ namespace modules {
|
|||||||
match = true;
|
match = true;
|
||||||
|
|
||||||
m_log.info("%s: Found matching hook (%s)", name(), hook->payload);
|
m_log.info("%s: Found matching hook (%s)", name(), hook->payload);
|
||||||
m_output.clear();
|
|
||||||
|
|
||||||
|
try {
|
||||||
auto command = command_util::make_command(hook->command);
|
auto command = command_util::make_command(hook->command);
|
||||||
command->exec(false);
|
command->exec(false);
|
||||||
command->tail([this](string line) { m_output = line; });
|
command->tail([this](string line) { m_output = line; });
|
||||||
|
} catch (const exception& err) {
|
||||||
|
m_log.err("%s: Failed to execute hook command (err: %s)", err.what());
|
||||||
|
m_output.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
|
Loading…
Reference in New Issue
Block a user