From 807ffd43be130ebc14cc5b2bb961a4c8359c8af0 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Fri, 22 Jan 2016 18:29:49 +0530 Subject: [PATCH] ensure `CACHE_VERSION` is defined before performing version comparison --- assets/runtime/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/runtime/functions b/assets/runtime/functions index bcbf8122..12ed4a13 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -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."