Skip to content

Commit 6e8dd89

Browse files
committed
Add extra branch check
When update hestia via v-update-sys-hestia-git jaapmarcus random-branch When after that calling v-update-sys-hestia-git system will check "hestiacp" "random-branch" that might not exists
1 parent d394b1e commit 6e8dd89

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/v-update-sys-hestia-git

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ if [ ! -z "$2" ]; then
133133
else
134134
source /usr/local/hestia/conf/hestia.conf
135135
branch=$RELEASE_BRANCH
136+
branch_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/hestia/control -o /dev/null)
137+
if [ $branch_check -ne "200" ]; then
138+
echo "ERROR: invalid branch name specified."
139+
exit 1
140+
fi
136141
fi
137142

138143
if [ -z "$branch" ]; then

0 commit comments

Comments
 (0)