<commit_before>import util from "./utils";
import path from "path";
import semver from "semver";

const DEFAULT_PRERELEASE_TAG_LIST_LIMIT = 10;

const git = {
	runCommand({
		args,
		showOutput = true,
		logMessage,
		failHelpKey = "gitCommandFailed",
		exitOnFail = true,
		showError = true,
		fullCommand = false,
		onError
	}) {
		const command = fullCommand ? `${args}` : `git ${args}`;

		if (!showOutput) {
			return util.exec(command);
		}

		if (onError === undefined) {
			onError = err => {
				util.advise(failHelpKey, { exit: exitOnFail });

				return showError
					? () => Promise.reject(err)
					: () => Promise.reject();
			};
		}

		util.log.begin(logMessage || command);
		return util
			.exec(command)
			.then(result => {<commit_msg>Remove default exist in OnError for git commands<commit_after>import util from "./utils";
import path from "path";
import semver from "semver";

const DEFAULT_PRERELEASE_TAG_LIST_LIMIT = 10;

const git = {
	runCommand({
		args,
		showOutput = true,
		logMessage,
		failHelpKey = "gitCommandFailed",
		exitOnFail = false,
		showError = true,
		fullCommand = false,
		onError
	}) {
		const command = fullCommand ? `${args}` : `git ${args}`;

		if (!showOutput) {
			return util.exec(command);
		}

		if (onError === undefined) {
			onError = err => {
				util.advise(failHelpKey, { exit: exitOnFail });

				return showError
					? () => Promise.reject(err)
					: () => Promise.reject();
			};
		}

		util.log.begin(logMessage || command);
		return util
			.exec(command)
			.then(result => {
{'fraction_non_alphanumeric': 0.1461836998706339, 'fraction_numerical': 0.00258732212160414, 'mean_word_length': 3.3948863636363638, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7501294', 'n_tokens_mistral': 603, 'n_tokens_neox': 520, 'n_words': 125}