From bf83e1cf0bcb7e33699f471faee654063d12ed19 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Sun, 24 Dec 2023 22:59:13 +0900 Subject: [PATCH] fixed a problem where a directory already existed --- package.json | 2 +- platform.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 522cce0..72b1ce1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fogtype/gadl", - "version": "1.4.1", + "version": "1.4.2", "license": "AGPL-3.0", "type": "module", "bin": "bin/run.js", diff --git a/platform.ts b/platform.ts index 2b38fd7..0d1e8fe 100644 --- a/platform.ts +++ b/platform.ts @@ -43,7 +43,7 @@ export function createPlatform(opts: { ...platform, async download(dir: string, book: Book): Promise { - await fs.mkdir(dir); + await fs.mkdir(dir, { recursive: true }); const files: Array<() => Promise> = await platform.getFiles(book); const digits = String(files.length).length;