Skip to content

Commit 716fbdd

Browse files
perf(server): skip the Windows shell probe when the desktop prepared the env
The desktop installs the PowerShell-probed environment into process.env before spawning the local backend and marks the bootstrap as prepared. The server still re-ran both PowerShell probes on Windows, adding seconds to every desktop startup. Honor the flag on Windows the way the POSIX path already does. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 1513557 commit 716fbdd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/server/src/os-jank.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ export const fixPath = Effect.fn("fixPath")(function* (options?: {
6363
const env = yield* HostProcess.Environment;
6464

6565
if (platform === "win32") {
66+
// The desktop already ran both PowerShell probes into the env this child
67+
// extends. Repeating them here costs seconds of startup on Windows.
68+
if (options?.shellEnvironmentPrepared === true) return;
6669
const repairedEnvironment = yield* resolveWindowsEnvironment(env).pipe(
6770
Effect.catchDefect((defect) =>
6871
Effect.sync(() => {

0 commit comments

Comments
 (0)