Dashboard › cli › Distillation
e2ec4a27-f314-45ae-835a-ab6da986a646["lore_tm_v1_nL9jWqQp1tr9o9Dq9zziBmH1L_FUbY7M5GPD9MDjvmE"]
detectInstallationMethod() to always check Homebrew first because stored install information may be stale, such as when a user switches from a recorded curl installation to Homebrew; the cheap realpath check is authoritative.detectInstallationMethod() detection priority is: 1. Homebrew realpath check, 2. stored install info in the DB, 3. legacy detection via curl paths → subprocess calls → node_modules path, and 4. automatically save the detected method for future runs.getCurlInstallPaths() prioritizes: 1. a stored DB path only when stored.method === "curl" and existsSync(dirname(stored.path)), 2. process.execPath when it is in a known curl install location, and 3. the XDG-aware default install directory.ENOENT ... open '.../sentry.lock'; existsSync failures such as EACCES or a transiently unmounted parent also fall through to process.execPath or the default-install fallback._knownCurlPaths and getKnownCurlPaths() to avoid circular-import TDZ issues before KNOWN_CURL_DIRS is fully initialized.downloadStableToPath(version, destPath, setMessage?, source = PRIMARY_UPGRADE_SOURCE) obtains its URL via getBinaryDownloadUrl(version, source); it first attempts the gzip URL {url}.gz and falls back to the raw binary on any failure, streaming decompression through DecompressionStream.UpgradeError when the file never becomes visible or stays empty.maybePrefetchPatches(channel, latestVersion, signal, source) forwards source to prefetchNightlyPatches(latestVersion, signal, source) or prefetchStablePatches(latestVersion, signal, source); prefetching only runs when semverCompare(latestVersion, CLI_VERSION) === 1, remains best-effort, logs failures with logger.debug("Delta patch pre-fetch failed (best-effort)", error), and does not prevent version checks from succeeding.checkForUpdateInBackgroundImpl() never to throw: it performs a non-blocking background update check, catches errors, and reports them to Sentry; DB-access failures from shouldCheckForUpdate() are handled with Sentry.captureException(error) before returning.getUpdateNotificationWithCopy() never to throw; errors are caught and reported to Sentry.getUpdateNotificationWithCopy() returns null when the CLI is up to date, cached version information is unavailable, notification is rate-limited, stderr is non-TTY, or an error occurs. When it returns a non-null message, it persists last_notified = now via markUpdateNotified, causing later calls within the rate-limit window to return null.