Dashboard › cli › Distillation
0cf29df7-3fa9-4c93-bb96-cf51a7cec34b["lore_tm_v1_E2S7qF_X7j2ufyJ_2oRklvrC8WeGvz7bfbKCCzOpX7E","lore_tm_v1_LD0GCWC3QwFmDOSoZsrn2woIu0reAdHI1d9gDZgsByA","lore_tm_v1_ddJCFL0GSFvl_hEp5R-fpQHD-EhGaQFdu5ma9ipLwoo","lore_tm_v1_gTZV8iwZbklaqe8JM_6gLlPt4AKcuM6glmgV_eFlUtE","lore_tm_v1_PKiNHi8EUKlxlwicZulHjeQteh0m7fIA5Bd_L4ddVwo","lore_tm_v1_ngHnQp93J-tPY8gbaPvnc-liEdoqJiLxRb5jSjJ5Htk"]
source/resource terms returned 100 matches with more available; notable upgrade-related matches were in packages/cli/src/lib/binary.ts and packages/cli/src/lib/delta-upgrade.ts.No files found./; stripTrailingSep(p) in packages/cli/src/lib/binary.ts:60-62 implements this by stripping only when p.length > 1 && p.endsWith(sep).packages/cli/src/lib/binary.ts defines IS_CASE_INSENSITIVE_FS as true on win32 and darwin; exported samePath(a, b) ignores one trailing separator and compares case-insensitively on those platforms, but case-sensitively elsewhere.packages/cli/src/lib/binary.ts defines LEGACY_INSTALL_SUBDIR = join(".sentry", "bin") and LEGACY_INSTALL_SUBDIRS = [LEGACY_INSTALL_SUBDIR]; migration deliberately excludes valid current targets ~/.local/bin and ~/bin.packages/cli/src/lib/binary.ts defines ordered UPGRADE_SOURCES: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }; 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }. PRIMARY_UPGRADE_SOURCE is the first entry.getBinaryDownloadUrl(version, source = PRIMARY_UPGRADE_SOURCE) builds https://github.com/${source.githubRepo}/releases/download/${source.tagPrefix}${version}/${getPlatformBinaryName()}; getGitHubReleasesUrl(source = PRIMARY_UPGRADE_SOURCE) builds https://api.github.com/repos/${source.githubRepo}/releases.resolveUpgradeSource(fetchFn = customFetch, signal?) in packages/cli/src/lib/binary.ts:267-291 probes each ordered source at ${getGitHubReleasesUrl(source)}/latest with getGitHubHeaders() and the abort signal; only HTTP 404 falls through, any other unsuccessful HTTP response immediately throws UpgradeError("network_error", "Failed to fetch from GitHub: HTTP ..."), and exhaustion throws UpgradeError("network_error", "No CLI upgrade source was found: every source returned HTTP 404").ResolvedUpgradeSource contains both source: UpgradeSource and the successful response: Response, enabling reuse of the source-probe response.getPlatformBinaryName() produces sentry-<os>-<arch>[-musl][.exe]; OS values are darwin, windows, or linux, architecture is arm64 or x64, musl adds -musl, and Windows adds .exe.isMusl() in packages/cli/src/lib/binary.ts caches its result and uses two ordered heuristics: 1. checks /lib/ld-musl-${muslArch}.so.1; 2. runs ldd --version and searches combined stdout/stderr for musl; non-Linux and failures default to false.determineInstallDir(homeDir, env) uses this exact priority: 1. SENTRY_INSTALL_DIR; 2. absolute XDG_BIN_HOME; 3. existing ~/.local/bin already in PATH; 4. existing ~/bin already in PATH; 5. ~/.local/bin fallback. PATH membership uses samePath().prefetchNightlyPatches and prefetchStablePatches in packages/cli/src/lib/version-check.ts, attemptDeltaUpgrade in packages/cli/src/lib/upgrade.ts, and declarations for resolveStableChain, resolveNightlyChain, resolveStableDelta, resolveNightlyDelta, attemptDeltaUpgrade, prefetchNightlyPatches, and prefetchStablePatches in packages/cli/src/lib/delta-upgrade.ts.packages/cli/test/lib/delta-upgrade.test.ts and packages/cli/test/lib/delta-upgrade.mocked.test.ts; the former exercises stable/nightly chain resolution, delta resolution, upgrade attempts, and both prefetch functions, while the latter has mocked calls to resolveStableDelta, resolveNightlyDelta, and attemptDeltaUpgrade.