From e8e4613c1ce59f5d565bf6f8bd4ed2b1afb24be5 Mon Sep 17 00:00:00 2001 From: JUN <243035832+lidge-jun@users.noreply.github.com> Date: Wed, 28 Oct 2026 21:11:37 +0900 Subject: [PATCH] test: copy macOS bundle binary in remote workspace fixture --- tests/clients/remote-workspace-codex-runtime.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/clients/remote-workspace-codex-runtime.test.ts b/tests/clients/remote-workspace-codex-runtime.test.ts index 82f3ef1639d..8eb13175445 100644 --- a/tests/clients/remote-workspace-codex-runtime.test.ts +++ b/tests/clients/remote-workspace-codex-runtime.test.ts @@ -244,7 +244,9 @@ test.skipIf(process.platform === "win32")("a macOS bundle alias is replaced by t const home = mkdtempSync(join(tmpdir(), "ocx-remote-mac-home-")); const bundleBinary = join(home, "Applications", "ChatGPT.app", "Contents", "Resources", "codex-cli", "bin", "codex"); mkdirSync(dirname(bundleBinary), { recursive: true }); - try { linkSync(process.execPath, bundleBinary); } catch { copyFileSync(process.execPath, bundleBinary); } + // A hardlink shares Bun's inode; macOS realpath can return either pathname. + // Give the bundle binary its own identity so canonicalization has one target. + copyFileSync(process.execPath, bundleBinary); const canonicalBinary = realpathSync(bundleBinary); const aliasRoot = mkdtempSync(join(tmpdir(), "ocx-remote-mac-alias-")); const alias = join(aliasRoot, "codex");