From a2a1642f67c6bfea49dc685df779016262bca768 Mon Sep 17 00:00:00 2001 From: rharkor Date: Mon, 16 Sep 2024 11:35:11 +0200 Subject: [PATCH] fix: ensure asset dir exists --- packages/cli-app/src/lib/stores/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/cli-app/src/lib/stores/index.ts b/packages/cli-app/src/lib/stores/index.ts index b45e7b13..d71a7d3a 100644 --- a/packages/cli-app/src/lib/stores/index.ts +++ b/packages/cli-app/src/lib/stores/index.ts @@ -31,12 +31,7 @@ const storesDirectory = path.join(dir, "assets", "stores") const loadStores = async () => { logger.debug(`Loading stores (${storesDirectory})`) - if (!(await fs.exists(storesDirectory))) { - throw new TRPCError({ - message: `The stores directory doesn't exist at ${storesDirectory}`, - code: "INTERNAL_SERVER_ERROR", - }) - } + await fs.ensureDir(storesDirectory) //* Get all the stores const formattedStoresDirectory = storesDirectory.replace(/\\/g, "/")