From 803f7cb9e8e8316c6f6efb6d4fed1ee380959fe8 Mon Sep 17 00:00:00 2001 From: Alexis Date: Thu, 30 Sep 2021 16:32:35 +0930 Subject: [PATCH] chore: pass env and args through from supervisor --- app/supervisor.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/supervisor.ts b/app/supervisor.ts index a10987dd2..2ff3b4e9e 100644 --- a/app/supervisor.ts +++ b/app/supervisor.ts @@ -111,8 +111,13 @@ const startApi = async (restarts = 0, shouldRestart = true) => { logger.debug('Spawning %s from %s', appName, apiPath); // Fork the child process - apiProcess = spawnProcess(apiPath, ['start', '--debug'], { - stdio: 'pipe' + const args = process.argv.slice(2); + apiProcess = spawnProcess(apiPath, args, { + stdio: 'pipe', + env: { + ...process.env, + DEBUG: undefined + } }); // Create stdout and stderr log files