From 589869cc3bd9d9a572d4866026f996f513a6eaf2 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 10 Oct 2026 15:36:16 -0400 Subject: [PATCH] test: honor CODEX_PATH in real Codex fixtures --- src/__tests__/acp-test-utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/__tests__/acp-test-utils.ts b/src/__tests__/acp-test-utils.ts index df6bcb74..b905d792 100644 --- a/src/__tests__/acp-test-utils.ts +++ b/src/__tests__/acp-test-utils.ts @@ -190,7 +190,14 @@ export function createBaseTestFixture(config: ConnectionConfig): TestFixture { * Use for integration tests that need to interact with the actual Codex binary. */ export function createTestFixture(): TestFixture { - const pathToCodex = path.resolve(process.cwd(), "node_modules", ".bin", process.platform === 'win32' ? "codex.cmd" : "codex"); + const bundledCodexPath = path.resolve( + process.cwd(), + "node_modules", + ".bin", + process.platform === 'win32' ? "codex.cmd" : "codex", + ); + const pathToCodex = process.env["CODEX_PATH"] ?? bundledCodexPath; + if (!fs.existsSync(pathToCodex)) { throw new Error(`Codex binary not found at ${pathToCodex}. Did you run 'npm install'?`); }