refactor: rename variable for clarity
This commit is contained in:
6
test.ts
6
test.ts
@@ -198,13 +198,13 @@ export const runTerraformApply = async <TVars extends TerraformVariables>(
|
||||
): Promise<TerraformState> => {
|
||||
const stateFile = `${dir}/${crypto.randomUUID()}.tfstate`;
|
||||
|
||||
const combinedEnv: Record<string, string | undefined> = {
|
||||
const childEnv: Record<string, string | undefined> = {
|
||||
...process.env,
|
||||
...(customEnv ?? {}),
|
||||
};
|
||||
for (const [key, value] of Object.entries(vars) as [string, JsonValue][]) {
|
||||
if (value !== null) {
|
||||
combinedEnv[`TF_VAR_${key}`] = String(value);
|
||||
childEnv[`TF_VAR_${key}`] = String(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ export const runTerraformApply = async <TVars extends TerraformVariables>(
|
||||
],
|
||||
{
|
||||
cwd: dir,
|
||||
env: combinedEnv,
|
||||
env: childEnv,
|
||||
stderr: "pipe",
|
||||
stdout: "pipe",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user