From 007076c67b960e2308a038ff91eb7d52ef0931db Mon Sep 17 00:00:00 2001 From: Andrii Bilokur Date: Wed, 3 Jul 2024 12:38:09 -0400 Subject: [PATCH] Solving interpolation issue in case an empty key --- src/com/mellanox/cicd/Matrix.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/mellanox/cicd/Matrix.groovy b/src/com/mellanox/cicd/Matrix.groovy index 7ba5ab33..1ac249a4 100644 --- a/src/com/mellanox/cicd/Matrix.groovy +++ b/src/com/mellanox/cicd/Matrix.groovy @@ -868,12 +868,12 @@ def replaceVars(vars, str) { for (def entry in entrySet(vars)) { + if (entry.key == "" || entry.key == null || entry.value == "" || entry.value == null) { + continue; + } if (!res.contains('$')) { return res } - if (entry.value == null) { - continue; - } def opts = ['$' + entry.key, '${' + entry.key + '}'] for (int i=0; i