Dashboard › cli › Distillation
b0e6bed6-5973-4afb-b28d-cde884b05ca7["lore_tm_v1_zXvezgFt6IffXNw1lzD6VFXRXTcx4mTSRmTkWwdmb6U","lore_tm_v1_LhQsYwpmz5epB6_3ekyeZR0KnmnLmSI8dY9oQu-qkrE","lore_tm_v1_uOoMghOyG5gN3DeFQorn1_p_KgWbRZIvNLRdAUShnkc"]
buildKnownCurlPaths() in packages/cli/test/lib/upgrade.test.ts must normalize a trailing slash on XDG_BIN_HOME so every known directory ends with exactly one sep, never a double sep which would break process.execPath.startsWith() directory-boundary checks; non-absolute XDG_BIN_HOME values are ignored.getCurlInstallPaths() tests requiring tempPath = installPath + ".download", oldPath = installPath + ".old", lockPath = installPath + ".lock", and a Windows .exe suffix for the sentry binary.getCurlInstallPaths() trusts a stored curl installation path only while its directory exists; stale paths and stored paths for non-curl methods are ignored, while process.execPath is used when it starts with a known curl installation directory.packages/cli/test/lib/upgrade.test.ts: sergical reported in #discuss-cli on 2026-06-22 that a test install using SENTRY_INSTALL_DIR=/tmp/sentry-test-install left a surviving DB install.path after the directory was purged, causing acquireLock to crash with ENOENT ... open '.../sentry.lock'; the fix is to reject a stored path whose directory no longer exists. (meaning Jun 22, 2026)"yarn" overrides a node_modules path hint, while Homebrew at /opt/homebrew/Cellar/sentry/1.2.3/bin/sentry takes priority over a node_modules path.getBinaryDownloadUrl("1.0.0") must use https://github.com/getsentry/toolkit/releases/download/, include /cli@1.0.0/, a sentry- asset name, and architecture arm64 or x64.packages/cli/test/lib/upgrade.test.ts: acquireLock() writes the current PID; rejects a lock held by a running process with Another upgrade is already in progress; replaces stale PID 4194304 and invalid not-a-number locks; treats EPERM as a running process and ESRCH as absent; and throws on unreadable-lock permission errors rather than recurring infinitely. releaseLock() removes an existing lock and does not throw if it is absent..gz asset succeeds, fallback to the raw asset after either .gz HTTP 404 or a .gz network exception, Failed to connect to GitHub when both attempts fail by network error, and lock release after upgrade failure.startCleanupOldBinary() removes an existing .old file asynchronously and tolerates absent files; it intentionally does not remove .download files because another process may be upgrading, leaving .download cleanup inside the upgrade flow under the exclusive lock.isNightlyVersion() accepts versions such as 0.0.0-dev.1740000000 and 0.0.0-dev.1, but rejects 1.0.0, 0.13.0, 2.0.0-beta.1, and 0.0.0-dev.fetchLatestNightlyVersion() tests requiring a GHCR token exchange plus manifest request, version extraction from the manifest annotations.version, error GHCR token exchange failed: HTTP 401 on token failure, error Nightly manifest has no version annotation when absent, and immediate AbortError when passed an already-aborted AbortSignal.sentry-${os}-${arch}${suffix}.gz, where OS is linux, darwin, or windows, architecture is arm64 or x64, and Windows suffix is .exe; fetch the layer by its digest and decompress the gzip blob.packages/cli/test/lib/install-script.test.ts contains install-script tests in this order: 1. primary source for latest stable CLI release; 2. filter Toolkit releases by the CLI tag prefix; 3. fall through to legacy stable only after HTTP 404; 4. stop source selection on non-404 response; 5. stop on network failure; 6. probe and download a pinned stable release from the same source; 7. select a nightly source before source-specific GHCR requests; 8. fallback when Toolkit nightly manifest returns 404; 9. stop when Toolkit nightly manifest returns non-404; 10. fallback from gzip to raw asset without changing sources; 11. pass setup options through to sentry cli setup; 12. embed the shared ordered upgrade-source list.