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 } = {}) {
|
||||
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;
|
||||
try {
|
||||
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 })) };
|
||||
} finally {
|
||||
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