Skip to content

Commit

Permalink
Don't overwrite when a file has already been staged to dist
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Aug 14, 2024
1 parent a35a1c5 commit fece28b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function stageStaticContent(srcDir, destDir) {
fs.ensureDir(path.dirname(destPath))
.then(() => {
// Copy the file to the new destination
fs.copy(file, destPath).catch((err) => console.error(`Error copying file ${file}:`, err));
fs.copy(file, destPath, { overwrite: false}).catch((err) => console.error(`Error copying file ${file}:`, err));
})
.catch((err) => console.error(`Error creating directory for ${destPath}:`, err));
});
Expand Down

0 comments on commit fece28b

Please sign in to comment.