We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5866592 commit 9ba7444Copy full SHA for 9ba7444
test/.gitignore
@@ -1,2 +1,3 @@
1
folders-to-delete
2
.tmp
3
+.tmp-*
test/setupRepo.ts
@@ -109,6 +109,15 @@ export async function setupRepo({
109
const dir: string = createTmpdir(tmpdir);
110
111
const foldersToDeletePath: string = path.join(__dirname, "folders-to-delete");
112
+ if (!fs.existsSync(foldersToDeletePath)) {
113
+ fs.writeFileSync(foldersToDeletePath, "");
114
+ }
115
+ const deletables = fs.readFileSync(foldersToDeletePath, { encoding: "utf-8" }).split("\n");
116
+ for (const d of deletables) {
117
+ if (fs.existsSync(d)) {
118
+ fs.rmdirSync(d, { recursive: true });
119
120
121
fs.appendFileSync(foldersToDeletePath, dir + "\n", { encoding: "utf-8" });
122
123
/**
0 commit comments