test: surface validator cleanup failures

Use force-only removal for the generated validator wrapper so an unwritten file is harmless while real cleanup errors still fail the test.
This commit is contained in:
Affaan Mustafa
2026-07-26 05:19:20 -04:00
parent 9ff6018675
commit baf1a560fd
+1 -1
View File
@@ -62,7 +62,7 @@ function runSourceViaTempFile(source) {
stderr: err.stderr || '',
};
} finally {
try { fs.unlinkSync(tmpFile); } catch (_) { /* ignore cleanup errors */ }
fs.rmSync(tmpFile, { force: true });
}
}