<commit_before>import yargs from 'yargs';
import { head, pipe, cond, equals, prop } from 'ramda';
import { reject } from 'bluebird';
import { build } from './build';

const commandEquals = value => pipe(prop('_'), head, equals(value));

const executeCommand = cond([
    [commandEquals('init'), init],
    [commandEquals('build'), build],
    [commandEquals('rung'), run]
]);

function cli(args) {
    executeCommand(args)
        .catch(err => {
            console.log('Ooooops, something went wrong...');
            console.log(err.stack);
            process.exit(1);
        });
}

function init(/* args */) {
    return reject('Not implemented yet!');
}

function run(/* args */) {<commit_msg>Printing error message instead of the stack<commit_after>import yargs from 'yargs';
import { head, pipe, cond, equals, prop } from 'ramda';
import { reject } from 'bluebird';
import { build } from './build';

const commandEquals = value => pipe(prop('_'), head, equals(value));

const executeCommand = cond([
    [commandEquals('init'), init],
    [commandEquals('build'), build],
    [commandEquals('rung'), run]
]);

function cli(args) {
    executeCommand(args)
        .catch(err => {
            console.log('Ooooops, something went wrong...');
            console.log(err.message);
            process.exit(1);
        });
}

function init(/* args */) {
    return reject('Not implemented yet!');
}

function run(/* args */) {
{'fraction_non_alphanumeric': 0.17318435754189945, 'fraction_numerical': 0.0013966480446927375, 'mean_word_length': 3.2522255192878338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4168804', 'n_tokens_mistral': 426, 'n_tokens_neox': 423, 'n_words': 116}