Skip to content

Commit

Permalink
Ensured that directories are scrubbed only after files are removed (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
billcui57 authored Nov 11, 2023
1 parent 05edbde commit 5ec29eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uwblueprint/create-bp-app",
"version": "1.0.19",
"version": "1.0.20",
"description": "Starter code generation CLI tool.",
"main": "index.js",
"bin": "bin/index.js",
Expand Down
9 changes: 1 addition & 8 deletions scrubber/scrubber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,9 @@ class Scrubber {
filesToDelete,
).map((filePath: string) => removeFileOrDir(filePath));

const scrubDirPromise = scrubDir(
this.config.dir,
ignoreFiles,
tags,
isDryRun,
);

// Remove files first, then scrub.
return Promise.all(removeFilePromises)
.then(() => scrubDirPromise)
.then(() => scrubDir(this.config!.dir, ignoreFiles, tags, isDryRun))
.catch((err) => Promise.reject(err));
}
}
Expand Down

0 comments on commit 5ec29eb

Please sign in to comment.