Skip to content

Commit

Permalink
Merge pull request objectionary#383 from mpa-LHutchinson/issue-382
Browse files Browse the repository at this point in the history
fixed clean message bug
  • Loading branch information
yegor256 authored Nov 20, 2024
2 parents 0de6d20 + 6f87f49 commit 3d49141
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 3d49141

Please sign in to comment.