fix(verify): report final success only after resource cleanup
This commit is contained in:
@@ -27,6 +27,7 @@ const verifierRun = createVerifierRun();
|
||||
const root = process.cwd();
|
||||
const workspace = await mkdtemp(join(tmpdir(), "rea-windows-package-"));
|
||||
const prefix = join(workspace, "prefix");
|
||||
let report;
|
||||
|
||||
try {
|
||||
const packed = JSON.parse(
|
||||
@@ -212,23 +213,23 @@ try {
|
||||
environment,
|
||||
});
|
||||
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({
|
||||
verifier_run: await completeVerifierRun(verifierRun),
|
||||
ok: true,
|
||||
platform: process.platform,
|
||||
package: packageResult.filename,
|
||||
tools: toolCount,
|
||||
ghidra_bridge: "present",
|
||||
agent_setup: ["opencode", "vscode", "copilot_cli"],
|
||||
setup_idempotent: true,
|
||||
uninstall: true,
|
||||
update,
|
||||
})}\n`,
|
||||
);
|
||||
report = {
|
||||
ok: true,
|
||||
platform: process.platform,
|
||||
package: packageResult.filename,
|
||||
tools: toolCount,
|
||||
ghidra_bridge: "present",
|
||||
agent_setup: ["opencode", "vscode", "copilot_cli"],
|
||||
setup_idempotent: true,
|
||||
uninstall: true,
|
||||
update,
|
||||
};
|
||||
} finally {
|
||||
await rm(workspace, { recursive: true, force: true });
|
||||
}
|
||||
process.stdout.write(
|
||||
`${JSON.stringify({ verifier_run: await completeVerifierRun(verifierRun), ...report })}\n`,
|
||||
);
|
||||
|
||||
function npm(arguments_, cwd) {
|
||||
const npmExecPath = process.env.npm_execpath;
|
||||
|
||||
Reference in New Issue
Block a user