in packages/actions/lib/common.js [87:100]
function deleteFolder(pathToDelete) {
if (fs.existsSync(pathToDelete)) {
fs.readdirSync(pathToDelete).forEach((file, index) => {
const curPath = path.join(pathToDelete, file);
if (fs.lstatSync(curPath).isDirectory()) {
deleteFolder(curPath);
} else {
// unlinkSync deletes files.
fs.unlinkSync(curPath);
}
});
fs.rmdirSync(pathToDelete);
}
}