Skip to content

Commit 5462a73

Browse files
committed
ignore error when trying to creating already existing lists folder
1 parent 2afa85d commit 5462a73

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

bin/gen-list.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ for (const tier of listTiers) {
2424
listData[tierData.name] = tierData.tasks;
2525
}
2626

27-
await mkdir('./lists');
27+
await mkdir('./lists').catch((e) => {
28+
if (e.code !== 'EEXIST') {
29+
throw e;
30+
}
31+
});
2832

2933
// @ts-expect-error
3034
await writeFile(`./lists/${listName}.json`, fmt.Serialize(listData));

0 commit comments

Comments
 (0)