From 5fc16d49b0aebdc91e64764a85b7be8f90112a7d Mon Sep 17 00:00:00 2001 From: John Torakis Date: Mon, 19 Sep 2022 11:39:08 +0300 Subject: [PATCH] feature: support for Env Vars with parse-json --- src/awsUtils.ts | 2 +- src/utils.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/awsUtils.ts b/src/awsUtils.ts index 2b23f93..bab9e38 100644 --- a/src/awsUtils.ts +++ b/src/awsUtils.ts @@ -152,7 +152,7 @@ const fetchAndInject = (secretsManagerClient: SecretsManager, } getSecretValueMap(secretsManagerClient, secretName, shouldParseJSON) .then(map => { - injectSecretValueMapToEnvironment(map, secretEnvVarName) + injectSecretValueMapToEnvironment(map, secretName, secretEnvVarName) }) .catch(err => { core.setFailed(`Failed to fetch '${secretName}'. Error: ${err}.`) diff --git a/src/utils.ts b/src/utils.ts index 2c7a7f0..cb21b0e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -62,7 +62,7 @@ export const getPOSIXString = (data: string): string => { } export const injectSecretValueMapToEnvironment = (secretValueMap: Record, - secretEnvVarName: string): void => { + secretPath: string, secretEnvVarName: string): void => { const disableWarnings = core.getBooleanInput(Inputs.DISABLE_WARNINGS) for (const secretName in secretValueMap) { @@ -76,7 +76,7 @@ export const injectSecretValueMapToEnvironment = (secretValueMap: Record