From 49a817b0bb65a2a92b328cb361ff4f66edab1f1b Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 9 Aug 2019 13:12:00 +0200 Subject: [PATCH] :bug: Fix bug when executing n8n from different folder --- packages/cli/src/WorkflowRunner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/WorkflowRunner.ts b/packages/cli/src/WorkflowRunner.ts index d842c4dd89..e936c18607 100644 --- a/packages/cli/src/WorkflowRunner.ts +++ b/packages/cli/src/WorkflowRunner.ts @@ -22,6 +22,7 @@ import { WorkflowExecuteMode, } from 'n8n-workflow'; +import { join as pathJoin } from 'path'; import { fork } from 'child_process'; @@ -144,7 +145,7 @@ export class WorkflowRunner { */ async run(data: IWorkflowExecutionDataProcess): Promise { const startedAt = new Date(); - const subprocess = fork('./dist/src/WorkflowRunnerProcess.js'); + const subprocess = fork(pathJoin(__dirname, 'WorkflowRunnerProcess.js')); // Register the active execution const executionId = this.activeExecutions.add(subprocess, data);