Skip to content

Commit

Permalink
CLI: exit with -1 when there are missing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriangalliat committed Feb 12, 2018
1 parent e300302 commit 12dae93
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cli.js
Expand Up @@ -118,8 +118,7 @@ export default function cli(args, log, error, exit) {
skipMissing: opt.argv.skipMissing,
}))
.then(result => print(result, log, opt.argv.json))
.then(({ dependencies: deps, devDependencies: devDeps }) =>
exit(opt.argv.json || (deps.length === 0 && devDeps.length) === 0 ? 0 : -1))
.then(result => exit((opt.argv.json || noIssue(result)) ? 0 : -1))
.catch((errorMessage) => {
error(errorMessage);
exit(-1);
Expand Down

0 comments on commit 12dae93

Please sign in to comment.