From f0ffbed1f30983367cc0f674195ce39e2df825e7 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 29 Nov 2016 07:22:01 +0100 Subject: [PATCH] feat(createWorker): pass argv and config_argv to spawned processes --- 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 f0104139..cb978ea5 100644 --- a/src/worker-client.ts +++ b/src/worker-client.ts @@ -87,9 +87,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 } });