Skip to content

Commit

Permalink
feat: adding process env vars to bundle and env loads
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun0157 committed May 27, 2024
1 parent 2e1b657 commit 420a602
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/variableParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function getBundleVariables(doc: string | undefined): Variables {
const error = checkVariables(variables);
if (error !== undefined) throw new Error(`error in variables: ${error}`);

return variables;
return replaceProcessEnvVars(variables);
}

export function getEnvironments(bundleContent: string | undefined, varFileContents: string[]): string[] {
Expand Down Expand Up @@ -67,7 +67,7 @@ export function loadVariables(
varFileContents.forEach((fileContents) => {
const parsedData = YAML.parse(fileContents);
if (parsedData && isDict(parsedData[envName])) {
Object.assign(envVars, parsedData[envName]);
Object.assign(envVars, replaceProcessEnvVars(parsedData[envName]));
}
});

Expand Down

0 comments on commit 420a602

Please sign in to comment.