Skip to content

Commit

Permalink
fixed clean message bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mpa-LHutchinson committed Nov 19, 2024
1 parent 0de6d20 commit 6f87f49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ const os = require('os');
*/
module.exports = function(opts) {
const home = path.resolve(opts.target);
fs.rmSync(home, {recursive: true, force: true});

if (fs.existsSync(home)) {
fs.rmSync(home, {recursive: true, force: true});
console.info('The directory %s deleted', rel(home));
} else {
console.info('The directory %s doesn\'t exist, no need to delete', rel(home));
Expand Down

0 comments on commit 6f87f49

Please sign in to comment.