Skip to content

Commit

Permalink
Merge pull request #4 from alexVauch/feature
Browse files Browse the repository at this point in the history
Abort task on error. Props to @alexVauch.
  • Loading branch information
stephenharris committed Mar 30, 2015
2 parents 6e98c54 + 4291b4f commit 666f1e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/checktextdomain.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,17 @@ grunt.registerMultiTask('checktextdomain', 'Checks gettext function calls for mi
//Reset errors
errors = [];
});



if( options.create_report_file ){
grunt.file.write( "." + this.target +".json", JSON.stringify( all_errors ) );
}

if ( error_num > 0) {
console.log( "\n" + chalk.red.bold('✖ ' + error_num + ' problem' + (error_num === 1 ? '' : 's')) );
grunt.fail.warn( error_num + ' problem' + (error_num === 1 ? '' : 's') );
} else {
console.log( "\n" + chalk.green.bold('✔ No problems') + "\n" );
}

if( options.create_report_file ){
grunt.file.write( "." + this.target +".json", JSON.stringify( all_errors ) );
}

});

Expand Down

0 comments on commit 666f1e9

Please sign in to comment.