diff --git a/packages/cli/src/WorkflowRunnerProcess.ts b/packages/cli/src/WorkflowRunnerProcess.ts index 14ae4a1abf..4a09c76a89 100644 --- a/packages/cli/src/WorkflowRunnerProcess.ts +++ b/packages/cli/src/WorkflowRunnerProcess.ts @@ -194,9 +194,9 @@ export class WorkflowRunnerProcess { * @param {any[]} parameters * @memberof WorkflowRunnerProcess */ - sendHookToParentProcess(hook: string, parameters: any[]) { // tslint:disable-line:no-any + async sendHookToParentProcess(hook: string, parameters: any[]) { // tslint:disable-line:no-any try { - sendToParentProcess('processHook', { + await sendToParentProcess('processHook', { hook, parameters, }); @@ -217,22 +217,22 @@ export class WorkflowRunnerProcess { const hookFunctions: IWorkflowExecuteHooks = { nodeExecuteBefore: [ async (nodeName: string): Promise => { - this.sendHookToParentProcess('nodeExecuteBefore', [nodeName]); + await this.sendHookToParentProcess('nodeExecuteBefore', [nodeName]); }, ], nodeExecuteAfter: [ async (nodeName: string, data: ITaskData): Promise => { - this.sendHookToParentProcess('nodeExecuteAfter', [nodeName, data]); + await this.sendHookToParentProcess('nodeExecuteAfter', [nodeName, data]); }, ], workflowExecuteBefore: [ async (): Promise => { - this.sendHookToParentProcess('workflowExecuteBefore', []); + await this.sendHookToParentProcess('workflowExecuteBefore', []); }, ], workflowExecuteAfter: [ async (fullRunData: IRun, newStaticData?: IDataObject): Promise => { - this.sendHookToParentProcess('workflowExecuteAfter', [fullRunData, newStaticData]); + await this.sendHookToParentProcess('workflowExecuteAfter', [fullRunData, newStaticData]); }, ], };