<commit_before>'use strict';

var shell = module.exports = {};
var shelljs = require('shelljs');
var log = require('./log.js');
// var exec = require('child_process').exec;

shell.failed = false;

shell.exec = function(command, options) {
  options = options || {};

  if (options.silent !== true) {
    log('$ ' + command, { arrow: false });
  }

  if (!shell.failed) {
    var result = shelljs.exec(command, options);

    log(result, result.output, result.code);

    if (result.code !== 0 && options.catchFail !== false) {
      shell.failed = true;
      log.error('Process aborted');
      log.error('Exit status: '+result.code);
      log.error('You may need to run any following commands manually...')
    }

    return result;
  }
  return { output: '', code: 0 };
};

// shell.run = function(command, options, callback) {
//   options = options || {};<commit_msg>Removed unneeded logging code<commit_after>'use strict';

var shell = module.exports = {};
var shelljs = require('shelljs');
var log = require('./log.js');
// var exec = require('child_process').exec;

shell.failed = false;

shell.exec = function(command, options) {
  options = options || {};

  if (options.silent !== true) {
    log('$ ' + command, { arrow: false });
  }

  if (!shell.failed) {
    var result = shelljs.exec(command, options);

    if (result.code !== 0 && options.catchFail !== false) {
      shell.failed = true;
      log.error('Process aborted');
      log.error('Exit status: '+result.code);
      log.error('You may need to run any following commands manually...')
    }

    return result;
  }
  return { output: '', code: 0 };
};

// shell.run = function(command, options, callback) {
//   options = options || {};
{'fraction_non_alphanumeric': 0.1789044289044289, 'fraction_numerical': 0.002331002331002331, 'mean_word_length': 3.1674757281553396, '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': '447523', 'n_tokens_mistral': 534, 'n_tokens_neox': 517, 'n_words': 140}