<commit_before>// @ts-check
const cp = require("child_process");
/**
 * 
 * @param {[string, string[]][]} tasks
 * @param {cp.SpawnSyncOptions} opts
 */
function runSequence(tasks, opts = { timeout: 100000, shell: true }) {
    let lastResult;
    for (const task of tasks) {
        console.log(`${task[0]} ${task[1].join(" ")}`);
        const result = cp.spawnSync(task[0], task[1], opts);
        if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && result.stderr.toString()}`);
        console.log(result.stdout && result.stdout.toString());<commit_msg>include stdout in `runSequence` thrown error<commit_after>// @ts-check
const cp = require("child_process");
/**
 * 
 * @param {[string, string[]][]} tasks
 * @param {cp.SpawnSyncOptions} opts
 */
function runSequence(tasks, opts = { timeout: 100000, shell: true }) {
    let lastResult;
    for (const task of tasks) {
        console.log(`${task[0]} ${task[1].join(" ")}`);
        const result = cp.spawnSync(task[0], task[1], opts);
        if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && "stderr: " + result.stderr.toString()}${result.stdout && "\nstdout: " + result.stdout.toString()}`);
        console.log(result.stdout && result.stdout.toString());
{'fraction_non_alphanumeric': 0.21216730038022813, 'fraction_numerical': 0.01977186311787072, 'mean_word_length': 3.9473684210526314, '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': '5251272', 'n_tokens_mistral': 433, 'n_tokens_neox': 422, 'n_words': 97}