Skip to content

Commit

Permalink
Remove console.log() use on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed May 31, 2017
1 parent eccdac5 commit 6561f46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/medic-conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if(!actions.every(a => supportedActions.includes(a))) {
process.exit(1);
}

const error = require('../src/lib/log').error;
const info = require('../src/lib/log').info;

return actions.reduce((promiseChain, action) =>
Expand All @@ -34,6 +35,6 @@ return actions.reduce((promiseChain, action) =>
.then(() => info(action, 'complete')),
Promise.resolve())
.catch(e => {
console.log(e);
error(e);
process.exit(1);
});
3 changes: 2 additions & 1 deletion src/cli/all.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const error = require('../lib/log').error;
const info = require('../lib/log').info;

const compileAppSettings = require('../fn/compile-app-settings');
Expand Down Expand Up @@ -49,7 +50,7 @@ module.exports = (project, couchUrl) => {
.then(() => info('Project configuration upload complete.'))

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

Expand Down

0 comments on commit 6561f46

Please sign in to comment.