<commit_before>'use strict';

var Promise = require('../ext/promise');
var exec    = Promise.denodeify(require('child_process').exec);
var chalk   = require('chalk');
var ui      = require('../ui');

module.exports = function runCommand(command, startedMsg) {
  return function() {
    ui.write('\n');
    ui.pleasantProgress.start(startedMsg);

    return exec(command, { maxBuffer: 1000 * 1024 }).then(function() {
      ui.write(chalk.green('done'));
    }, error);
  };
};

function error(err) {
  ui.write('\n' + chalk.red(err) + '\n');
}
<commit_msg>update run command error message<commit_after>'use strict';

var Promise = require('../ext/promise');
var exec    = Promise.denodeify(require('child_process').exec);
var chalk   = require('chalk');
var ui      = require('../ui');

module.exports = function runCommand(command, startedMsg) {
  return function() {
    ui.write('\n');
    ui.pleasantProgress.start(startedMsg);

    return exec(command, { maxBuffer: 1000 * 1024 }).then(function() {
      ui.write(chalk.green('done'));
    }, error);
  };
};

function error(err) {
  ui.write(chalk.red('\nError thrown while running shell command\n\n'));
  ui.write(err);
}

{'fraction_non_alphanumeric': 0.18744698897370654, 'fraction_numerical': 0.013570822731128074, 'mean_word_length': 3.896265560165975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2232157', 'n_tokens_mistral': 398, 'n_tokens_neox': 376, 'n_words': 78}