From 26965e914e70759ba63f16f19b93bfdf30028383 Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Tue, 30 Jan 2024 12:12:33 +0100
Subject: [PATCH] fix: sanitize empty variable test expressions

rewrite all '$SOME_VAR' test expressions to '($SOME_VAR != null && $SOME_VAR != "")'
---
 templates/validation.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/validation.yml b/templates/validation.yml
index eec58a5..22e9124 100644
--- a/templates/validation.yml
+++ b/templates/validation.yml
@@ -60,7 +60,7 @@ gitlab-ci-lint:
     - ci_lint
   rules:
     # enabled if $GITLAB_TOKEN and GITLAB_CI_FILES are set
-    - if: '$GITLAB_TOKEN && $GITLAB_CI_FILES'
+    - if: '($GITLAB_TOKEN != null && $GITLAB_TOKEN != "") && $GITLAB_CI_FILES'
 
 check-links:
   image: 
-- 
GitLab