Skip to content

Commit

Permalink
Ignore fs.rm exception when the directory doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmetral committed Aug 15, 2024
1 parent 00689b4 commit c824b34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brut/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function getConfig() {
async function init() {
console.time("Total build time");
const config = await getConfig();
await rm(config.outDir, { recursive: true });
await rm(config.outDir, { recursive: true, force: true }); // force ignores the exception when dist doesn't exist (e.g. in CI)
await mkdir(config.outDir);
await Promise.all([moveFiles(config), buildPages(config)]);
console.timeEnd("Total build time");
Expand Down

0 comments on commit c824b34

Please sign in to comment.