Skip to content

Commit

Permalink
Merge pull request #225 from Automattic/fix/epipe-error
Browse files Browse the repository at this point in the history
Fix EPIPE error when hitting quit
  • Loading branch information
elazzabi authored Jan 17, 2019
2 parents 6853e64 + dfeb3a7 commit 00e25e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/cli/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import { trackEvent } from 'lib/tracker';
import pager from 'lib/cli/pager';

function uncaughtError( err ) {
// Error raised when trying to write to an already closed stream
if ( err.code === 'EPIPE' ) {
return;
}

console.log();
console.log( ' ', chalk.red( '✕' ), ' Unexpected error: Please contact VIP Support with the following error:' );
console.log( ' ', chalk.dim( err.stack ) );
Expand Down

0 comments on commit 00e25e3

Please sign in to comment.