From 02dfff85cb54b0e930d8227f4736eabff1797701 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 28 Jan 2017 06:36:10 +0100 Subject: [PATCH] feat(createWorker): pass argv and config_argv to spawned processes (#487) --- src/worker-client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/worker-client.ts b/src/worker-client.ts index ef81d653..432bb918 100644 --- a/src/worker-client.ts +++ b/src/worker-client.ts @@ -91,9 +91,10 @@ export function createWorker(taskModule: string): any { try { const workerModule = join(__dirname, 'worker-process.js'); - const worker = fork(workerModule, [], { + const worker = fork(workerModule, process.argv, { env: { - FORCE_COLOR: true + FORCE_COLOR: true, + npm_config_argv: process.env.npm_config_argv } });