fix: secret reference skip if not found

This commit is contained in:
=
2024-09-10 22:23:40 +05:30
parent ea3b3c5cec
commit ed71e651f6
@@ -444,7 +444,9 @@ export const expandSecretReferencesFactory = ({
depth: depth + 1 depth: depth + 1
}); });
} }
expandedValue = expandedValue.replaceAll(interpolationSyntax, referedValue); if (referedValue) {
expandedValue = expandedValue.replaceAll(interpolationSyntax, referedValue);
}
} else { } else {
const secretReferenceEnvironment = entities[0]; const secretReferenceEnvironment = entities[0];
const secretReferencePath = path.join("/", ...entities.slice(1, entities.length - 1)); const secretReferencePath = path.join("/", ...entities.slice(1, entities.length - 1));
@@ -463,7 +465,9 @@ export const expandSecretReferencesFactory = ({
}); });
} }
expandedValue = expandedValue.replaceAll(interpolationSyntax, referedValue); if (referedValue) {
expandedValue = expandedValue.replaceAll(interpolationSyntax, referedValue);
}
} }
} }
} }