Dashboard › cli › Distillation
a5715063-3816-43d0-9257-b40c0a495aa3["lore_tm_v1_7v9skRinYeF35UVXochtXhBHj7RqbF9XIDy0eLc2LT4","lore_tm_v1_dusJbQ_KGoYHDs_Yqw0WtkO5-5ILjX64WgHI-DTMjZY","lore_tm_v1_eHNL_6vHKnUPIJ2ZZTok0bGH8sAFHcq68vi1sEgAh_M","lore_tm_v1_P2JKd9S6S3UXvfhFh_p1VugH-Zkdd3ORc6a4JRJM_wM","lore_tm_v1_dzJbLthNGYa_dkiCKqTt4nZfASOvW_cAKFYv4jaRPX8","lore_tm_v1_HoX9edOXZ1MnKz05P3mat2UfrmqK26WXBu4VW8G5HJU","lore_tm_v1_AsbjCeQ5h47nZzvm2CncQ5CW2EII1k9y0zjXNuAhlqc"]
packages/cli/src/lib/binary.ts defines getPlatformBinaryName() using OS names "darwin", "windows", or "linux"; architecture is "arm64" only when process.arch === "arm64" and otherwise "x64"; it appends "-musl" when isMusl() is true and ".exe" on Windows, yielding sentry-<os>-<arch>[-musl][.exe].isMusl() detects musl by combining ldd stdout and stderr and checking case-insensitively for "musl"; if ldd is absent or fails, it caches false and assumes glibc.getBinaryDownloadUrl(version) returns https://github.com/getsentry/cli/releases/download/${version}/${getPlatformBinaryName()}; GITHUB_RELEASES_URL is "https://api.github.com/repos/getsentry/cli/releases".isNightlyVersion(version) identifies nightlies by version.includes("-dev."); expected nightly format is X.Y.Z-dev.<unix-seconds>.compareVersions(a, b) delegates to semverCompare(a, b) and returns -1 | 0 | 1; the underlying Bun SemVer ordering compares nightly numeric prerelease identifiers numerically.fetchLatestFromGitHub(signal?) passes the signal to fetchWithUpgradeError() for ${GITHUB_RELEASES_URL}/latest, uses getGitHubHeaders(), throws UpgradeError("network_error", ...) for a failed response or missing tag_name, and strips VERSION_PREFIX_REGEX.fetchLatestFromNpm() requests ${NPM_REGISTRY_URL}/latest with Accept: "application/json"; non-OK responses throw UpgradeError("network_error", \Failed to fetch from npm: ${response.status}`), and a missing versionthrowsUpgradeError("network_error", "No version found in npm registry")`.fetchLatestNightlyVersion(signal) checks signal?.aborted before token exchange and before manifest retrieval, the implementation calls getAnonymousToken() and fetchNightlyManifest(token) without passing the signal; therefore the signal does not cancel either in-flight GHCR request.streamDecompressToFile() must always be flushed/closed, including after streaming failure.ENOSPC while the write buffer is full may never emit "drain"; backpressure must race "drain" against "error" and remove the unused listener.waitForBinaryVisible() must throw when the downloaded binary never becomes visible or remains empty.downloadBinaryToTemp() holds its acquired lock across the download→spawn→install pipeline and returns lockPath so the caller can release it after the child exits; if the child resolves to the same install path, acquireLock permits takeover via process.ppid, making the parent’s later release a no-op.downloadBinaryToTemp() verifies tempPath with waitForBinaryVisible() after either delta or full download and logs Binary verified (${formatBytes(verifiedSize)}); this prevents spawning an absent or zero-byte binary.downloadBinaryToTemp() calls clearPatchCache() as best-effort cleanup because patches for the old version are obsolete; cleanup failure does not fail the upgrade.downloadBinaryToTemp() applies executable mode 0o755 to tempPath on non-Windows platforms, then returns { tempBinaryPath: tempPath, lockPath, patchBytes }; any caught error releases lockPath before rethrowing.tryDeltaUpgrade() delegates to attemptDeltaUpgrade(version, process.execPath, destPath, offline, setMessage), using the currently running executable as the patch base.downloadFullBinary() selects downloadNightlyToPath(destPath, version, setMessage) when isNightlyVersion(version) is true; otherwise it selects downloadStableToPath(downloadTag ?? version, destPath, setMessage).packages/cli/src/lib/version-check.ts, packages/cli/src/lib/upgrade.ts, packages/cli/src/lib/scan/binary.ts, packages/cli/src/lib/release-notes.ts, packages/cli/src/lib/binary.ts, packages/cli/src/lib/ghcr.ts, packages/cli/src/lib/delta-upgrade.ts, packages/cli/src/lib/db/version-check.ts, and packages/cli/src/commands/cli/upgrade.ts.