Fix child process env: spread process.env before CODEX_HOME override
The env option on ChildProcess.make was set to only { CODEX_HOME: ... }
without spreading process.env, causing the spawned codex exec process to
lose all inherited environment variables (PATH, HOME, API keys, etc.).
This matches the pattern used in codexAppServerManager.ts and
CodexProvider.ts.
This commit is contained in:
1 file changed
+4
-1
@@ -172,7 +172,10 @@ const makeCodexTextGeneration = Effect.gen(function* () {
|
||||
"-",
|
||||
],
|
||||
{
|
||||
env: codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {},
|
||||
env: {
|
||||
...process.env,
|
||||
...(codexSettings?.homePath ? { CODEX_HOME: codexSettings.homePath } : {}),
|
||||
},
|
||||
cwd,
|
||||
shell: process.platform === "win32",
|
||||
stdin: {
|
||||
|
||||
Reference in new issue
Block a user