Skip to content

Commit eb2bafb

Browse files
committed
fix: ensure temporary cache directory is empty
1 parent b02caf9 commit eb2bafb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

v-next/hardhat/test/internal/builtin-plugins/console/task-action.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ describe("console/task-action", function () {
145145
});
146146

147147
afterEach(function () {
148-
fs.rmSync(cacheDir, { recursive: true, force: true });
148+
if (fs.existsSync(history)) {
149+
fs.rmSync(history, { force: true, maxRetries: 3 });
150+
}
151+
fs.rmSync(cacheDir, { recursive: true, force: true, maxRetries: 3 });
149152
});
150153

151154
it("should create a history file", async function () {

0 commit comments

Comments
 (0)