fix(server): restore CODEX_HOME tilde expansion for Codex launches (#2255)
This commit is contained in:
1 parent
e25db3a572
commit
aa2d385a62
2 files changed
+6
-2
No files matched your search
@@ -28,6 +28,7 @@ import { ServerSettingsError } from "@t3tools/contracts";
|
||||
import { makeManagedServerProvider } from "../makeManagedServerProvider.ts";
|
||||
import { buildServerProvider } from "../providerSnapshot.ts";
|
||||
import { CodexProvider } from "../Services/CodexProvider.ts";
|
||||
import { expandHomePath } from "../../pathExpansion.ts";
|
||||
import { ServerSettingsService } from "../../serverSettings.ts";
|
||||
import packageJson from "../../../package.json" with { type: "json" };
|
||||
|
||||
@@ -222,7 +223,7 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
|
||||
command: input.binaryPath,
|
||||
args: ["app-server"],
|
||||
cwd: input.cwd,
|
||||
...(input.homePath ? { env: { CODEX_HOME: input.homePath } } : {}),
|
||||
...(input.homePath ? { env: { CODEX_HOME: expandHomePath(input.homePath) } } : {}),
|
||||
}),
|
||||
);
|
||||
const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe(
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS,
|
||||
CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS,
|
||||
} from "../CodexDeveloperInstructions.ts";
|
||||
import { expandHomePath } from "../../pathExpansion.ts";
|
||||
|
||||
const PROVIDER = "codex" as const;
|
||||
|
||||
@@ -683,7 +684,9 @@ export const makeCodexSessionRuntime = (
|
||||
.spawn(
|
||||
ChildProcess.make(options.binaryPath, ["app-server"], {
|
||||
cwd: options.cwd,
|
||||
...(options.homePath ? { env: { ...process.env, CODEX_HOME: options.homePath } } : {}),
|
||||
...(options.homePath
|
||||
? { env: { ...process.env, CODEX_HOME: expandHomePath(options.homePath) } }
|
||||
: {}),
|
||||
shell: process.platform === "win32",
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user