fix: merge platform_overrides env with base env instead of replacing

platform_overrides.*.env was replacing the entire mcp_config.env object
instead of merging, causing base env vars (including ${user_config.*}
references) to be silently dropped when platform overrides defined any
env vars.

Fixes #217

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Thompson 2026-03-26 08:23:18 -05:00
commit cb052a20e5
No known key found for this signature in database
GPG key ID: 1D66D91917EE02E6

View file

@ -117,7 +117,9 @@ export async function getMcpConfigForManifest(
result.command = platformConfig.command || result.command;
result.args = platformConfig.args || result.args;
result.env = platformConfig.env || result.env;
result.env = platformConfig.env
? { ...result.env, ...platformConfig.env }
: result.env;
}
}