From bd7842799c4d5e60f96fcfd67ef43d6bcbac05d0 Mon Sep 17 00:00:00 2001 From: aewing Date: Wed, 21 Jan 2026 04:18:53 +0000 Subject: [PATCH] Fix orchestrator to inherit env vars when spawning modes --- ModeSwitch/backend/orchestrator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ModeSwitch/backend/orchestrator.ts b/ModeSwitch/backend/orchestrator.ts index 097bdba..a702b30 100644 --- a/ModeSwitch/backend/orchestrator.ts +++ b/ModeSwitch/backend/orchestrator.ts @@ -88,8 +88,8 @@ async function startMode(mode: string): Promise { cmd: [process.execPath, 'run', serverPath], cwd: modePath, env: { - // Force mode service to bind to shared port - PORT: String(SHARED_PORT), + ...process.env, // Inherit all env vars (secrets, etc.) + PORT: String(SHARED_PORT), // Force mode service to bind to shared port }, stdout: 'pipe', stderr: 'pipe',