Use ExecuteCommandProcessFinishedHandler in NullEventTask

This commit is contained in:
Mattia Codato 2020-07-21 08:33:43 +02:00
parent 8758e58b92
commit 986c07fd7d
1 changed files with 12 additions and 0 deletions

View File

@ -11,4 +11,16 @@ REGISTER_FUNCTION_NONCONST(Internal, NullEvent, &NullEventTask::ScriptFunc, "che
void NullEventTask::ScriptFunc(const Checkable::Ptr& checkable, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
{
REQUIRE_NOT_NULL(checkable);
if (Checkable::ExecuteCommandProcessFinishedHandler) {
double now = Utility::GetTime();
ProcessResult pr;
pr.PID = -1;
pr.Output = "";
pr.ExecutionStart = now;
pr.ExecutionEnd = now;
pr.ExitStatus = 0;
Checkable::ExecuteCommandProcessFinishedHandler("", pr);
}
}