fix: apply acceptance bindings to the runner process environment
This commit is contained in:
@@ -845,6 +845,11 @@ async function setupContext({ repositoryRoot = defaultRepositoryRoot, env = proc
|
|||||||
|
|
||||||
export async function runIntegration({ repositoryRoot = defaultRepositoryRoot, keep = false, env = process.env, announce } = {}) {
|
export async function runIntegration({ repositoryRoot = defaultRepositoryRoot, keep = false, env = process.env, announce } = {}) {
|
||||||
const ctx = await setupContext({ repositoryRoot, env });
|
const ctx = await setupContext({ repositoryRoot, env });
|
||||||
|
const priorEnv = {};
|
||||||
|
for (const [key, value] of Object.entries(ctx.env)) {
|
||||||
|
priorEnv[key] = process.env[key];
|
||||||
|
process.env[key] = value;
|
||||||
|
}
|
||||||
let success = false;
|
let success = false;
|
||||||
try {
|
try {
|
||||||
const checks = await productionChecks(ctx);
|
const checks = await productionChecks(ctx);
|
||||||
@@ -864,6 +869,10 @@ export async function runIntegration({ repositoryRoot = defaultRepositoryRoot, k
|
|||||||
return { exitCode: success ? 0 : 1, runRoot: ctx.run.root, retained: !(await finalizeOwnedRun({ run: ctx.run, success, keep })) };
|
return { exitCode: success ? 0 : 1, runRoot: ctx.run.root, retained: !(await finalizeOwnedRun({ run: ctx.run, success, keep })) };
|
||||||
} finally {
|
} finally {
|
||||||
await stopBackend(ctx).catch(() => {});
|
await stopBackend(ctx).catch(() => {});
|
||||||
|
for (const [key, value] of Object.entries(ctx.env)) {
|
||||||
|
if (priorEnv[key] === undefined) delete process.env[key];
|
||||||
|
else process.env[key] = priorEnv[key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user