ensure CACHE_VERSION is defined before performing version comparison

This commit is contained in:
Sameer Naik 2016-01-22 18:29:49 +05:30
parent cc9109b989
commit 807ffd43be

View File

@ -1106,7 +1106,7 @@ migrate_database() {
fi
if [[ $(vercmp ${GITLAB_VERSION} 8.0.0) -gt 0 ]]; then
if [[ $(vercmp ${CACHE_VERSION} 8.0.0) -lt 0 ]]; then
if [[ -n ${CACHE_VERSION} && $(vercmp ${CACHE_VERSION} 8.0.0) -lt 0 ]]; then
echo
echo "ABORT: "
echo " Upgrading to GitLab ${GITLAB_VERSION} from ${CACHE_VERSION} is not recommended."