« get me outta code hell

write: static-build: ensure output directory exists first of all - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-08 10:44:06 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-08 10:44:06 -0300
commitf2e6da9c339b9b4b862d9070188f4b0ba07baf45 (patch)
treeccda0addcdae3f480ca753b87f20cb3dfefd002d /src
parent7ddefc6e44791397b9aadac781dbfa7c1536bdd5 (diff)
write: static-build: ensure output directory exists first of all
Diffstat (limited to 'src')
-rw-r--r--src/write/build-modes/static-build.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/write/build-modes/static-build.js b/src/write/build-modes/static-build.js
index 8fb60cdd..60614c29 100644
--- a/src/write/build-modes/static-build.js
+++ b/src/write/build-modes/static-build.js
@@ -154,6 +154,8 @@ export async function go({
   const writeAll = empty(selectedPageFlags) || selectedPageFlags.includes('all');
   logInfo`Writing site pages: ${writeAll ? 'all' : selectedPageFlags.join(', ')}`;
 
+  await mkdir(outputPath, {recursive: true});
+
   await writeSymlinks({
     srcRootPath,
     mediaPath,