Test for format of tag version.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
pull/1244/head
Dan Schaper 7 years ago
parent 5e6f8489a9
commit e087797edc
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC

@ -1160,7 +1160,8 @@ FTLinstall() {
echo -n "::: Installing FTL ... "
latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}')
if [ ! "${latesttag}" ]; then
# Tags should always start with v, check for that.
if [[ ! "${latesttag}" == v* ]]; then
echo "failed (error in getting latest release location from GitHub)"
return 1
fi

Loading…
Cancel
Save