5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 08:20:28 +00:00

Add a null check to name.sh

This commit is contained in:
Neil Alexander 2018-12-27 21:44:29 +00:00
parent 6fcd8a8dbd
commit 8c7b9e2f90
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -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