fix(scripts): improve offline resilience and restore missing update scripts
All checks were successful
Check / eval-and-lint (push) Successful in 7m5s

This commit is contained in:
Bernardo Magri
2026-06-01 20:07:08 +01:00
parent 6ed2ca3d78
commit 1e6becd42d
6 changed files with 67 additions and 12 deletions

View File

@@ -13,9 +13,15 @@ fi
# Use ix.io as the default pastebin
if [[ -n $1 ]]; then
url=$(curl -F "f:1=@$1" ix.io)
# --connect-timeout 5: fail fast if ix.io is unreachable
url=$(curl -s --connect-timeout 5 -F "f:1=@$1" ix.io || echo "OFFLINE")
else
url=$(curl -F "f:1=@-" ix.io)
url=$(curl -s --connect-timeout 5 -F "f:1=@-" ix.io || echo "OFFLINE")
fi
if [[ "$url" == "OFFLINE" ]]; then
echo "Error: Could not upload log. Check your internet connection."
exit 1
fi
echo "Log uploaded to: $url"