From 6db6c68a4e95d63e92f79b4e3093384c8b2ef4f6 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 10 Jul 2025 21:34:35 +0200 Subject: [PATCH] update: abort if FTL branch does not exist Currently, if the FTL update check returns 404, hence the FTL branch does not seem to exist, an error message is printed, but the update continues, only the FTL update is skipped. This can lead to setups with v5 FTL and v6 core/web, failing at config migration, where FTL is invoked with a v6-only command. With this change, the update aborts immediately if the FTL branch is invalid, like it does in case of other FTL update check errors (other HTTP error codes than 404 or other curl errors). Hence it continues only if FTL is up-to-date already, or a new version from the given branch has been found. Signed-off-by: MichaIng --- advanced/Scripts/update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 5fb7de18..4e0d973e 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -164,6 +164,7 @@ main() { ;; 2) echo -e " ${INFO} FTL:\\t\\t${COL_RED}Branch is not available.${COL_NC}\\n\\t\\t\\tUse ${COL_GREEN}pihole checkout ftl [branchname]${COL_NC} to switch to a valid branch." + exit 1 ;; 3) echo -e " ${INFO} FTL:\\t\\t${COL_RED}Something has gone wrong, cannot reach download server${COL_NC}"