Skip to content

Commit d5e50e4

Browse files
committed
ajout cwd dans spawn pour etre en path relatif
1 parent b69eea0 commit d5e50e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_common/tasks/executor.task.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { spawn } from 'node:child_process';
22
import { Job } from 'bullmq';
33
import { ExecutorResponseInterface } from '../interfaces/executor-response.interface';
44
import { ExecutorConfigInterface } from '../interfaces/executor-config.interface';
5-
import { join } from 'path';
5+
import { join, dirname } from 'path';
66

77
function convertNullToEmptyString(obj) {
88
if (obj === null) {
@@ -39,6 +39,7 @@ export async function executorTask(
3939
const child = spawn(join(command), {
4040
shell: options?.shell ?? true,
4141
stdio: 'pipe',
42+
cwd: dirname(command)
4243
});
4344

4445
child.stdin.write(jobDataArg);

0 commit comments

Comments
 (0)