diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index 520fc8338d..17c44b0c3c 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -141,6 +141,7 @@ export default { readyUrl: `http://${LOOPBACK}:{port}/.well-known/t3/environment`, command: { executable: resolved.node, + inheritEnv: ["CODEX_HOME", "T3CODE_DEV_SEED"], args: [startApp, "web", T3_HOME, LOOPBACK, "{port}"], cwd: APP_DIR, startupTimeout: 300_000, @@ -161,6 +162,7 @@ export default { readyUrl: `http://127.0.0.1:${MOBILE.metroPort}/status`, command: { executable: resolved.node, + inheritEnv: ["CODEX_HOME", "T3CODE_DEV_SEED"], args: [ startApp, "mobile", diff --git a/scripts/scenarios/start-app.ts b/scripts/scenarios/start-app.ts index 5dee3f26c1..a358824158 100644 --- a/scripts/scenarios/start-app.ts +++ b/scripts/scenarios/start-app.ts @@ -76,7 +76,7 @@ const prepareHome = Effect.fn("startApp.prepareHome")(function* (home: string) { { driver, enabled: false, - ...(driver === "codex" ? { config: { binaryPath: noModel } } : {}), + ...(driver === "codex" ? { config: { binaryPath: noModel, setupMode: "existing", homePath: process.env.CODEX_HOME } } : {}), }, ]), ), @@ -128,6 +128,7 @@ const startApp = Effect.fn("startApp")(function* (input: { yield* prepareHome(input.home); const env = { ...hostEnvironment, + HOME: path.join(input.home, "isolated-home"), PATH: `${path.join(input.home, "bin")}:${hostEnvironment.PATH ?? ""}`, T3CODE_AUTO_BOOTSTRAP_PROJECT_FROM_CWD: "0", };