Skip to content

Commit

Permalink
feat(ui): support an error of "false" that exits without logging
Browse files Browse the repository at this point in the history
- this can simplify some of the weird promise chaining in that if a
command needs to exit without doing anything else it can just reject
with false as the rejection
  • Loading branch information
acburdine committed May 6, 2017
1 parent f0af011 commit a98995d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ui.js
Expand Up @@ -162,7 +162,8 @@ class UI {
} else if (isObject(error)) {
// TODO: find better way to handle object errors?
this.log(JSON.stringify(error));
} else {
} else if (error !== false) {
// If the error is false, we're just exiting (makes the promise chains easier)
this.log('An unknown error occured.');
}
}
Expand Down

0 comments on commit a98995d

Please sign in to comment.