Dashboard › cli › Distillation
764aff58-229d-428d-8797-50edf77e2c98["lore_tm_v1_uVBredEhA2LomtnQKZFm-bmrCxcI_WT9bM3CwwlY5s0","lore_tm_v1_GYPVCrMVO2oJxwndIQw3ECj1rc_C3r9a1r404VbgIFE"]
detectInstallationMethod() in packages/cli/src/lib/upgrade.ts must always check Homebrew first because stored install information may be stale; a cheap, authoritative isHomebrewInstall() realpath check overrides stale stored data, such as when a user switches from curl installation to Homebrew.node_modules path, 4. automatically save the detected method for future runs.packages/cli/src/lib/upgrade.ts throws UpgradeError when the file never becomes visible or stays empty.stripTrailingSep() in packages/cli/src/lib/binary.ts strips a trailing path separator so paths such as ~/.local/bin/ and ~/.local/bin compare equally, but never strips it from a bare root like /; implementation is p.length > 1 && p.endsWith(sep) ? p.slice(0, -1) : p.packages/cli/src/lib/upgrade.ts now imports prerelease as semverPrerelease and valid as semverValid from semver, imports compareVersions, and defines PAGE_NUMBER_REGEX = /^[1-9]\d*$/.packages/cli/src/lib/binary.ts defines KNOWN_CURL_DIRS = [".local/bin", "bin", ".sentry/bin"].packages/cli/src/lib/binary.ts treats Windows and macOS filesystems as case-insensitive by default through IS_CASE_INSENSITIVE_FS = process.platform === "win32" || process.platform === "darwin".~/.sentry/bin: LEGACY_INSTALL_SUBDIR = join(".sentry", "bin") and LEGACY_INSTALL_SUBDIRS = [LEGACY_INSTALL_SUBDIR]; ~/.local/bin and ~/bin remain valid current XDG targets and must not be treated as migration sources.packages/cli/src/lib/binary.ts uses two ordered heuristics: 1. check /lib/ld-musl-<arch>.so.1, 2. run ldd --version and inspect combined stdout/stderr case-insensitively for "musl"; if ldd is missing or fails, assume glibc. The result is cached in cachedIsMusl because libc cannot change at runtime.getBinaryDownloadUrl(version, source = PRIMARY_UPGRADE_SOURCE) now builds source-specific GitHub URLs using source.tagPrefix, source.githubRepo, and getPlatformBinaryName(): https://github.com/${source.githubRepo}/releases/download/${source.tagPrefix}${version}/${getPlatformBinaryName()}.getGitHubReleasesUrl(source = PRIMARY_UPGRADE_SOURCE) returns https://api.github.com/repos/${source.githubRepo}/releases.getGitHubReleaseByTagUrl(version, source = PRIMARY_UPGRADE_SOURCE) uses the source-specific tag ${source.tagPrefix}${version} and URL-encodes it with encodeURIComponent(tag).getGitHubLatestReleaseUrl(source = PRIMARY_UPGRADE_SOURCE) uses ${getGitHubReleasesUrl(source)}?per_page=100 when source.tagPrefix is present, but ${getGitHubReleasesUrl(source)}/latest otherwise.GITHUB_RELEASES_URL is now defined as getGitHubReleasesUrl().isNightlyVersion(version) identifies nightly builds by version.includes("-dev."); nightly versions use the format X.Y.Z-dev.<unix-seconds>.determineInstallDir gives explicit SENTRY_INSTALL_DIR environment-variable configuration first priority and returns env.SENTRY_INSTALL_DIR when set.${url}.gz; if the response is successful and has a body, it calls streamDecompressToFile(gzResponse.body, destPath, setMessage), while gzip errors are silently caught and fall through to the raw download.