fix(scripts): improve offline resilience and restore missing update scripts
All checks were successful
Check / eval-and-lint (push) Successful in 7m5s
All checks were successful
Check / eval-and-lint (push) Successful in 7m5s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user