Skip to content

Commit

Permalink
Add catch for when themes directory already exists when building themes
Browse files Browse the repository at this point in the history
  • Loading branch information
golf1052 committed Sep 23, 2022
1 parent 68de48a commit 94addf7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/scripts/build-themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ function main(): void {
printE(e);
}

// Make sure themes dir exists
fs.mkdirSync(themesDir);
try {
// Make sure themes dir exists
fs.mkdirSync(themesDir);
} catch {
}

// Empty the themes dir
fs.readdirSync(themesDir).forEach(file => {
fs.unlinkSync(path.join(themesDir, file));
Expand Down

0 comments on commit 94addf7

Please sign in to comment.