Remove unneeded Promise.resolve

This commit is contained in:
Michael B. Gale
2026-09-10 16:59:12 +01:00
parent d23593114c
commit aaa014366e

View File

@@ -23,7 +23,7 @@ async function withTmpFile<T>(
try { try {
const filePath = path.join(tmpDir, baseFileName); const filePath = path.join(tmpDir, baseFileName);
fs.writeFileSync(filePath, contents); fs.writeFileSync(filePath, contents);
return await Promise.resolve(body(filePath)); return await body(filePath);
} finally { } finally {
fs.rmSync(tmpDir, { recursive: true, force: true }); fs.rmSync(tmpDir, { recursive: true, force: true });
} }