diff --git a/templates/gitlab-ci-gcloud.yml b/templates/gitlab-ci-gcloud.yml
index 006db5c3ab017918e17088fdd6a824396a15d034..23a465f57be289f777c3d40a18af838c66922190 100644
--- a/templates/gitlab-ci-gcloud.yml
+++ b/templates/gitlab-ci-gcloud.yml
@@ -120,7 +120,7 @@ stages:
         _cond_val=$(echo "$_cond_val" | tr '[:punct:]' '_')
         # retrieve comparison value
         _cmp_val_prefix="scoped__${_target_var}__${_condition}__${_cond_var}__${_test_op}__"
-        _cmp_val=${_scoped_var#$_cmp_val_prefix}
+        _cmp_val=${_scoped_var#"$_cmp_val_prefix"}
         # manage 'ignore case'
         if [[ "$_test_op" == *_ic ]]
         then