From 31e81319234378dfa6bc1df02ee42c2df6b1dfc6 Mon Sep 17 00:00:00 2001 From: "Hyeonjae.Jeong" Date: Thu, 12 Nov 2026 11:20:18 +0900 Subject: [PATCH] test(desktop): account for PATH augmentation on macOS --- .../lib/trpc/routers/workspaces/utils/git.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/lib/trpc/routers/workspaces/utils/git.test.ts b/apps/desktop/src/lib/trpc/routers/workspaces/utils/git.test.ts index fa2c05b0bea..5929876fdbb 100644 --- a/apps/desktop/src/lib/trpc/routers/workspaces/utils/git.test.ts +++ b/apps/desktop/src/lib/trpc/routers/workspaces/utils/git.test.ts @@ -277,9 +277,11 @@ describe("Shell Environment", () => { }, 10_000); test("getProcessEnvWithShellPath applies shell PATH and preserves string vars", async () => { - const { getProcessEnvWithShellPath, getShellEnvironment } = await import( - "./shell-env" - ); + const { + augmentPathForMacOS, + getProcessEnvWithShellPath, + getShellEnvironment, + } = await import("./shell-env"); const shellEnv = await getShellEnvironment(); const env = await getProcessEnvWithShellPath({ @@ -293,7 +295,9 @@ describe("Shell Environment", () => { const shellPath = shellEnv.PATH || shellEnv.Path; if (shellPath) { - expect(env.PATH).toBe(shellPath); + const expected = { PATH: shellPath }; + augmentPathForMacOS(expected); + expect(env.PATH).toBe(expected.PATH); if (process.platform === "win32" || "Path" in shellEnv) { expect(env.Path).toBe(shellPath); }