Skip to content

Commit

Permalink
Fix windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MulverineX committed Oct 30, 2023
1 parent e54c95e commit 0677230
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
Expand Down

0 comments on commit 0677230

Please sign in to comment.