feat: support secret environment variables in CLI (#3815)

This commit is contained in:
James George
2024-02-08 22:08:18 +05:30
committed by GitHub
parent 00862eb192
commit 5bcc38e36b
30 changed files with 791 additions and 145 deletions

View File

@@ -105,6 +105,7 @@ export function parseTemplateStringE(
while (result.match(REGEX_ENV_VAR) != null && depth <= ENV_MAX_EXPAND_LIMIT) {
result = decodeURI(encodeURI(result)).replace(REGEX_ENV_VAR, (_, p1) => {
const variable = variables.find((x) => x && x.key === p1)
if (variable && "value" in variable) {
// Mask the value if it is a secret and explicitly specified
if (variable.secret && maskValue) {