Skip to content

Commit

Permalink
fix(log): catch errors thrown from prettystream
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Mar 16, 2017
1 parent e25b810 commit 40e6a79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/commands/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ module.exports.execute = function execute(name, options) {
let slice = sliceFile(logFileName);
let prettyStream = new PrettyStream();

prettyStream.on('error', (error) => {
if (!(error instanceof SyntaxError)) {
throw error;
}
});

prettyStream.pipe(this.ui.stdout);

if (options.follow) {
Expand Down

0 comments on commit 40e6a79

Please sign in to comment.