fix(recovery): prompt users to download latest build after crash loops (#778)

Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
This commit is contained in:
Mega Mind
2026-04-22 15:07:48 -07:00
committed by GitHub
co-authored by Steven Enamakel
parent 1e3743f28e
commit 44fda19734
5 changed files with 177 additions and 67 deletions
+10 -3
View File
@@ -255,7 +255,12 @@ PY
ASSET_URL="$(echo "${parsed}" | sed -n '3p')"
ASSET_SHA256="$(echo "${parsed}" | sed -n '4p')"
[ -n "${ASSET_URL}" ]
# Exit 0 on success, 2 when API responded but no compatible asset was found.
# Callers can distinguish "no asset" (2) from network/parse errors (1).
if [ -n "${ASSET_URL}" ]; then
return 0
fi
return 2
}
resolve_release_digest() {
@@ -292,8 +297,10 @@ if resolve_from_latest_json; then
log_ok "Resolved latest release via latest.json (${LATEST_VERSION})"
else
log_warn "latest.json lookup failed. Falling back to releases API."
if ! resolve_from_release_api; then
if [ "${DRY_RUN}" = true ]; then
resolve_from_release_api
resolve_rc=$?
if [ "${resolve_rc}" -ne 0 ]; then
if [ "${DRY_RUN}" = true ] && [ "${resolve_rc}" -eq 2 ]; then
if [ "${OS}" = "linux" ]; then
log_warn "No Linux release asset is currently published. Dry-run will skip install steps."
echo "DRY RUN: no compatible asset available for ${OS}/${ARCH}"