mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
🐛 Fix bug when executing n8n from different folder
This commit is contained in:
parent
f3d5b136ba
commit
49a817b0bb
|
@ -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<string> {
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue