From 8c7b9e2f90f2b1ce8f432295599acdcb1b963e0c Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 27 Dec 2018 21:44:29 +0000 Subject: [PATCH] Add a null check to name.sh --- contrib/semver/name.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/semver/name.sh b/contrib/semver/name.sh index 935cc75..1fa2ce0 100644 --- a/contrib/semver/name.sh +++ b/contrib/semver/name.sh @@ -4,8 +4,8 @@ BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null) # Complain if the git history is not available -if [ $? != 0 ]; then - printf "unknown" +if [ $? != 0 ] || [ -z "$BRANCH" ]; then + printf "yggdrasil" exit 1 fi