Skip to content

Commit

Permalink
make sure that errors with lint end up on stderr, phetsims/aqua#166
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Apr 28, 2023
1 parent 9599db5 commit 2b3073e
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions js/grunt/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,20 @@ const lint = async ( repos, options ) => {
for ( let i = 0; i < repos.length; i++ ) {
options.showProgressBar && repos.length > 1 && showCommandLineProgress( i / repos.length, false );

const results = await lintOneRepo( repos[ i ], {
cache: options.cache,
format: options.format,
fix: options.fix,
inProgressErrorLogging: inProgressErrorLogging
} );

allResults.push( ...results );
try {
const results = await lintOneRepo( repos[ i ], {
cache: options.cache,
format: options.format,
fix: options.fix,
inProgressErrorLogging: inProgressErrorLogging
} );

allResults.push( ...results );
}
catch( e ) {
console.error( e ); // make sure that the error ends up on stderr
throw e;
}
}

options.showProgressBar && repos.length > 1 && showCommandLineProgress( 1, true );
Expand Down

0 comments on commit 2b3073e

Please sign in to comment.