diff --git a/install/install-openappstack.sh b/install/install-openappstack.sh
index db3644970a1fd1ee40139aff431378ce54c60aa1..2071c12371223920db04614dc7b2deec91124d89 100755
--- a/install/install-openappstack.sh
+++ b/install/install-openappstack.sh
@@ -9,6 +9,8 @@ flux install \
 
 # get current git branch name
 branch=$CI_COMMIT_REF_NAME
+[ -z "$branch" ] && branch=$(git rev-parse --abbrev-ref HEAD)
+
 echo "Tracking branch $branch for https://open.greenhost.net/openappstack/openappstack flux repo"
 
 flux create source git openappstack \