Skip to content

Commit

Permalink
return -1 on cli error
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Aug 25, 2019
1 parent d7b1760 commit 27bfdf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ function main(args) {

if (unusedList.length === 0) {
spinner.succeed('No unused variables found!');
spinner.stop();
process.exit(0);
}

spinner.stop();

process.exit(unusedList.length);
process.exit(1);
}

const args = commander.args.filter(arg => typeof arg === 'string');
Expand Down

0 comments on commit 27bfdf6

Please sign in to comment.