Skip to content

[BUG] Windows - legacy binary cleanup never runs (platform === 'win32' is always false) #206

@mynameistito

Description

@mynameistito

In the postinstall script (apps/cli/src/build.ts), platform is mapped through platformMap to "windows", but the legacy binary path check compares against "win32":

const platformMap = { darwin: "darwin", linux: "linux", win32: "windows" };
const platform = platformMap[os.platform()]; // "windows" on Windows
const legacyCachedBinary = path.join(binDir, platform === "win32" ? ".executor.exe" : ".executor");
//                                                      ^^^^^^^^^^ always false

On Windows this always resolves to .executor instead of .executor.exe, so the old binary never gets cleaned up.

Fix: change the comparison to platform === "windows".

Fixed in: apps/cli/src/build.ts


Identified and fixed with AI assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions