<commit_before>import exec from '../utils/exec';
import {join} from 'upath';

let nginxpath;
async function getnginxpath () {
	if (nginxpath === undefined) {
		let cmd = 'nginx -t';
		/* istanbul ignore next */
		if (process.env.TRAVIS) {
			return join(process.cwd(), 'etc');
		}
		let log = await exec(cmd);
		log = log.stdout || log.stderr;
		if (log === undefined) {
			throw new Error('Err! are you sure nginx is running and well configured.'.red);
		}
		nginxpath = log.toString().match(/.* file (.*)nginx\.conf test/)[1];
	}
	return nginxpath;
}

export { getnginxpath };<commit_msg>ci(nginx): missing slash in the returned route from nginx<commit_after>import exec from '../utils/exec';
import {join} from 'upath';

let nginxpath;
async function getnginxpath () {
	if (nginxpath === undefined) {
		let cmd = 'nginx -t';
		/* istanbul ignore next */
		if (process.env.TRAVIS) {
			return join(process.cwd(), 'etc', '/');
		}
		let log = await exec(cmd);
		log = log.stdout || log.stderr;
		if (log === undefined) {
			throw new Error('Err! are you sure nginx is running and well configured.'.red);
		}
		nginxpath = log.toString().match(/.* file (.*)nginx\.conf test/)[1];
	}
	return nginxpath;
}

export { getnginxpath };
{'fraction_non_alphanumeric': 0.16842961757526445, 'fraction_numerical': 0.0016273393002441008, 'mean_word_length': 3.5724907063197024, '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': '1035843', 'n_tokens_mistral': 462, 'n_tokens_neox': 423, 'n_words': 126}