Skip to content

Commit

Permalink
Merge pull request #110 from cksource/t/104
Browse files Browse the repository at this point in the history
Feature: Repositories, where an executed command failed, will be printed out at the end of the mgit log. Closes #104.
  • Loading branch information
Reinmar committed Jul 23, 2019
2 parents 11b379a + 256799f commit 2d1450c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ module.exports = function( args, options ) {

if ( packagesWithError.size ) {
const repositoryForm = packagesWithError.size === 1 ? 'repository' : 'repositories';
const message = `\n❗❗❗ The command failed to execute in ${ packagesWithError.size } ${ repositoryForm }.\n`;
let message = `\n❗❗❗ The command failed to execute in ${ packagesWithError.size } ${ repositoryForm }:\n`;
message += [ ...packagesWithError ].map( pkgName => ` - ${ pkgName }` ).join( '\n' );
message += '\n';

console.log( chalk.red( message ) );
process.exit( 1 );
Expand Down

0 comments on commit 2d1450c

Please sign in to comment.