Skip to content

Commit

Permalink
Log error.out if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Feb 10, 2020
1 parent e4fab5e commit 44f5e3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/env/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ const withSpinner = ( command ) => ( ...args ) => {
);
},
( error ) => {
const errorMessage = error.message || error.err || error.out;
spinner.fail( errorMessage );
spinner.fail( error.message || error.err );
if ( error.out ) {
// eslint-disable-next-line no-console
console.error( `\n\n${ error.out }\n\n` );
}
process.exit( error.exitCode || 1 );
}
);
Expand Down

0 comments on commit 44f5e3c

Please sign in to comment.