diff --git a/packages/bun-internal-test/src/runner.node.mjs b/packages/bun-internal-test/src/runner.node.mjs index 3c5a3e5a134d84..5b98a33348c4ea 100644 --- a/packages/bun-internal-test/src/runner.node.mjs +++ b/packages/bun-internal-test/src/runner.node.mjs @@ -249,9 +249,9 @@ async function runTest(path) { metadata.time = {}; try { metadata.time = JSON.parse(readFileSync(tmpFile, "utf-8")); + rmSync(tmpFile); } catch (e) { } - rmSync(tmpFile); if (tmpDir) { spawn("rm", ["-rf", tmpDir], { stdio: "inherit", detached: true }).unref(); }