Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
Fixes #18
  • Loading branch information
sindresorhus committed Sep 18, 2020
1 parent 7c72385 commit 5ceb4e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ const cli = meow(`
}
});

if (cli.input.length === 0) {
console.error('Specify at least one path');
process.exit(1);
}

(async () => {
if (cli.input.length === 0) {
console.error('Specify at least one path');
process.exitCode = 1;
return;
}

const files = await del(cli.input, cli.flags);

if (cli.flags.dryRun) {
console.log(files.join('\n'));
}
})();

0 comments on commit 5ceb4e9

Please sign in to comment.