diff --git a/apps/desktop/src/syncShellEnvironment.ts b/apps/desktop/src/syncShellEnvironment.ts index 2181bea0c..921120ff3 100644 --- a/apps/desktop/src/syncShellEnvironment.ts +++ b/apps/desktop/src/syncShellEnvironment.ts @@ -7,7 +7,7 @@ export function syncShellEnvironment( readEnvironment?: ShellEnvironmentReader; } = {}, ): void { - if ((options.platform ?? process.platform) !== "darwin") return; + if ((options.platform ?? process.platform) === "win32") return; try { const shell = env.SHELL ?? "/bin/zsh"; diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index 0a33be0cb..d8b5fa0f5 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -18,6 +18,11 @@ import { } from "./config"; import { fixPath, resolveStateDir } from "./os-jank"; import { Open } from "./open"; + +// Fix PATH eagerly before any Layer construction so that CLI probes +// (e.g. ProviderHealthLive → `codex --version`) can find binaries +// installed via version managers (nvm, bun, etc.). +fixPath(); import * as SqlitePersistence from "./persistence/Layers/Sqlite"; import { makeServerProviderLayer, makeServerRuntimeServicesLayer } from "./serverLayers"; import { ProjectionSnapshotQuery } from "./orchestration/Services/ProjectionSnapshotQuery"; diff --git a/apps/server/src/os-jank.ts b/apps/server/src/os-jank.ts index 586aca6f7..4dbd21ff4 100644 --- a/apps/server/src/os-jank.ts +++ b/apps/server/src/os-jank.ts @@ -3,7 +3,7 @@ import { Effect, Path } from "effect"; import { readPathFromLoginShell } from "@t3tools/shared/shell"; export function fixPath(): void { - if (process.platform !== "darwin") return; + if (process.platform === "win32") return; try { const shell = process.env.SHELL ?? "/bin/zsh";