Skip to content

Commit

Permalink
Solving interpolation issue in case an empty key
Browse files Browse the repository at this point in the history
  • Loading branch information
B-a-S committed Jul 4, 2024
1 parent 03f48de commit 007076c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/mellanox/cicd/Matrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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<opts.size(); i++) {
if (res.contains(opts[i])) {
Expand Down

0 comments on commit 007076c

Please sign in to comment.