installer: exit if FTL update check fails (#6316)

This commit is contained in:
Dan Schaper 2025-07-10 10:59:05 -07:00 committed by GitHub
commit 080e1ccf8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1938,8 +1938,8 @@ FTLcheckUpdate() {
path="${ftlBranch}/${binary}"
# Check whether or not the binary for this FTL branch actually exists. If not, then there is no update!
local status
if ! check_download_exists "$path"; then
local status
status=$?
if [ "${status}" -eq 1 ]; then
printf " %b Branch \"%s\" is not available.\\n" "${INFO}" "${ftlBranch}"
@ -2029,6 +2029,11 @@ FTLdetect() {
if FTLcheckUpdate "${1}"; then
FTLinstall "${1}" || return 1
else
case $? in
1) :;; # FTL is up-to-date
*) exit 1;; # 404 (2), other HTTP or curl error (3), unknown (4)
esac
fi
}