Skip to content

Commit

Permalink
restore folder check for scripts in clean
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenegriffin committed Apr 23, 2021
1 parent edb26e8 commit f1ec494
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tasks/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ rmdir(path.join(__dirname, "..", "src", "transpiled"));

// We don't remove Scripts, but instead remove child directories of Scripts
const scriptsFolder = path.join(__dirname, "..", "Scripts");
fs.readdirSync(scriptsFolder).forEach((file, index) => {
const subpath = path.join(scriptsFolder, file);
if (fs.lstatSync(subpath).isDirectory()) {
rmdir(subpath);
}
});
if (fs.existsSync(scriptsFolder)) {
fs.readdirSync(scriptsFolder).forEach((file, index) => {
const subpath = path.join(scriptsFolder, file);
if (fs.lstatSync(subpath).isDirectory()) {
rmdir(subpath);
}
});
}

0 comments on commit f1ec494

Please sign in to comment.