From 94addf73479f1c8256247e15b52112c2342d77d2 Mon Sep 17 00:00:00 2001 From: Sanders Lauture Date: Fri, 23 Sep 2022 13:50:07 -0700 Subject: [PATCH] Add catch for when themes directory already exists when building themes --- src/scripts/build-themes.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scripts/build-themes.ts b/src/scripts/build-themes.ts index 7c1aeae..4280f2c 100644 --- a/src/scripts/build-themes.ts +++ b/src/scripts/build-themes.ts @@ -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));