From 0677230dbef289cfec32be3f0b7ec089b3ce74c1 Mon Sep 17 00:00:00 2001 From: Mulverine Date: Sun, 29 Oct 2023 23:36:24 -0600 Subject: [PATCH] Fix windows paths --- package.json | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e6b37e4..a63d0c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sandstone-build", - "version": "1.0.5", + "version": "1.0.6", "description": "The Build component for the Sandstone CLI.", "type": "module", "exports": "./lib/index.js", diff --git a/src/index.ts b/src/index.ts index 63f7e43..87b7f8e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -331,7 +331,7 @@ async function _buildProject(cliOptions: BuildOptions, { absProjectFolder, proje // Not in cache: write to disk const realPath = path.join(outputFolder, relativePath) - await fs.ensureDir(realPath.replace(/\/[^\/]+$/, '')) + await fs.ensureDir(realPath.replace(/(?:\/|\\)(?:.(?!(?:\/|\\)))+$/, '')) return await fs.writeFile(realPath, content) } })