mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-07-27 23:54:06 +02:00
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 <micha@dietpi.com>
This commit is contained in:
parent
5b5e02d492
commit
6db6c68a4e
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user