Default variable to blank string

This commit is contained in:
Phil Jay
2023-09-18 08:55:00 +10:00
parent e5f8667dfc
commit 468208262a

View File

@@ -33,7 +33,7 @@ if [[ -z "${BATS_VERSION:-}" ]] ; then
default_branch="$(git remote show origin | ${grep} 'HEAD branch' | cut -d ' ' -f 5)"
fi
# use release_branch if not empty
if [[ -n "${release_branch}" ]] ; then
if [[ -n "${release_branch:-}" ]] ; then
default_branch="${release_branch}"
fi