diff --git a/docs/RELEASE.md b/docs/RELEASE.md index d2605dcd..c5b3a7c0 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -201,6 +201,8 @@ electron-builder generates these artifacts per platform: ## Stable Download Links The `upload-stable-links` job in `release.yml` re-uploads key assets with version-agnostic names. +It starts only after **release-mac** (two matrix jobs), **release-win**, and **release-linux** all succeed, so it often stays in **Queued** until the slowest job finishes. Delays of several minutes are common when macOS hosted runners are backed up. + This enables permanent links in README that always point to the latest release: ``` diff --git a/src/main/services/infrastructure/CliInstallerService.ts b/src/main/services/infrastructure/CliInstallerService.ts index 472901e9..8bb797e6 100644 --- a/src/main/services/infrastructure/CliInstallerService.ts +++ b/src/main/services/infrastructure/CliInstallerService.ts @@ -17,9 +17,9 @@ * - Human-readable error messages per phase */ +import { execCli, killProcessTree, spawnCli } from '@main/utils/childProcess'; import { appendCliAuthDiag } from '@main/utils/cliAuthDiagLog'; import { buildMergedCliPath } from '@main/utils/cliPathMerge'; -import { execCli, killProcessTree, spawnCli } from '@main/utils/childProcess'; import { getClaudeBasePath, getHomeDir } from '@main/utils/pathDecoder'; import { getCachedShellEnv, diff --git a/src/main/utils/cliPathMerge.ts b/src/main/utils/cliPathMerge.ts index d03e67cb..2c1b6406 100644 --- a/src/main/utils/cliPathMerge.ts +++ b/src/main/utils/cliPathMerge.ts @@ -3,10 +3,9 @@ * Packaged macOS apps get a minimal PATH; login-shell cache fixes that once warm. */ -import { realpathSync } from 'fs'; -import { dirname, join, posix as pathPosix, win32 as pathWin32 } from 'path'; - import { getCachedShellEnv, getShellPreferredHome } from '@main/utils/shellEnv'; +import { realpathSync } from 'fs'; +import { join as pathJoin, posix as pathPosix, win32 as pathWin32 } from 'path'; /** * Build a PATH string that prefers the CLI binary directory, then the user's @@ -20,10 +19,11 @@ export function buildMergedCliPath(binaryPath?: string | null): string { const extraDirs: string[] = []; if (binaryPath) { - const binDir = dirname(binaryPath); + const pathForBin = process.platform === 'win32' ? pathWin32 : pathPosix; + const binDir = pathForBin.dirname(binaryPath); extraDirs.push(binDir); try { - const realBinDir = dirname(realpathSync(binaryPath)); + const realBinDir = pathForBin.dirname(realpathSync(binaryPath)); if (realBinDir !== binDir) { extraDirs.push(realBinDir); } @@ -36,18 +36,18 @@ export function buildMergedCliPath(binaryPath?: string | null): string { if (cachedEnv?.PATH) { extraDirs.push(...cachedEnv.PATH.split(sep).filter(Boolean)); } else if (process.platform === 'win32') { - extraDirs.push(join(home, 'AppData', 'Roaming', 'npm'), join(home, 'scoop', 'shims')); + extraDirs.push(pathJoin(home, 'AppData', 'Roaming', 'npm'), pathJoin(home, 'scoop', 'shims')); if (process.env.LOCALAPPDATA) { - extraDirs.push(join(process.env.LOCALAPPDATA, 'Programs', 'claude')); + extraDirs.push(pathJoin(process.env.LOCALAPPDATA, 'Programs', 'claude')); } if (process.env.ProgramFiles) { - extraDirs.push(join(process.env.ProgramFiles, 'claude')); + extraDirs.push(pathJoin(process.env.ProgramFiles, 'claude')); } } else { extraDirs.push( - join(home, '.local', 'bin'), - join(home, '.npm-global', 'bin'), - join(home, '.npm', 'bin'), + pathPosix.join(home, '.local', 'bin'), + pathPosix.join(home, '.npm-global', 'bin'), + pathPosix.join(home, '.npm', 'bin'), '/usr/local/bin', '/opt/homebrew/bin' );