Skip to content

Commit

Permalink
Non-0 exit code on CLI error
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed May 31, 2017
1 parent c62d191 commit 3793a42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bin/medic-conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ return actions.reduce((promiseChain, action) =>
.then(() => require(`../src/fn/${action}`)(project, couchUrl))
.then(() => info(action, 'complete')),
Promise.resolve())
.catch(console.log);
.catch(e => {
console.log(e);
process.exit(1);
});
5 changes: 4 additions & 1 deletion src/cli/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ module.exports = (project, couchUrl) => {

.then(() => info('Project configuration upload complete.'))

.catch(console.log);
.catch(e => {
console.log(e);
process.exit(1);
});

};

0 comments on commit 3793a42

Please sign in to comment.