File tree Expand file tree Collapse file tree
apps/server/src/provider/Layers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import { ServerSettingsError } from "@t3tools/contracts";
2828import { makeManagedServerProvider } from "../makeManagedServerProvider.ts" ;
2929import { buildServerProvider } from "../providerSnapshot.ts" ;
3030import { CodexProvider } from "../Services/CodexProvider.ts" ;
31+ import { expandHomePath } from "../../pathExpansion.ts" ;
3132import { ServerSettingsService } from "../../serverSettings.ts" ;
3233import packageJson from "../../../package.json" with { type : "json" } ;
3334
@@ -222,7 +223,7 @@ const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(fun
222223 command : input . binaryPath ,
223224 args : [ "app-server" ] ,
224225 cwd : input . cwd ,
225- ...( input . homePath ? { env : { CODEX_HOME : input . homePath } } : { } ) ,
226+ ...( input . homePath ? { env : { CODEX_HOME : expandHomePath ( input . homePath ) } } : { } ) ,
226227 } ) ,
227228 ) ;
228229 const client = yield * Effect . service ( CodexClient . CodexAppServerClient ) . pipe (
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import {
3030 CODEX_DEFAULT_MODE_DEVELOPER_INSTRUCTIONS ,
3131 CODEX_PLAN_MODE_DEVELOPER_INSTRUCTIONS ,
3232} from "../CodexDeveloperInstructions.ts" ;
33+ import { expandHomePath } from "../../pathExpansion.ts" ;
3334
3435const PROVIDER = "codex" as const ;
3536
@@ -683,7 +684,9 @@ export const makeCodexSessionRuntime = (
683684 . spawn (
684685 ChildProcess . make ( options . binaryPath , [ "app-server" ] , {
685686 cwd : options . cwd ,
686- ...( options . homePath ? { env : { ...process . env , CODEX_HOME : options . homePath } } : { } ) ,
687+ ...( options . homePath
688+ ? { env : { ...process . env , CODEX_HOME : expandHomePath ( options . homePath ) } }
689+ : { } ) ,
687690 shell : process . platform === "win32" ,
688691 } ) ,
689692 )
You can’t perform that action at this time.
0 commit comments