<commit_before>import fs from 'fs';

console.log(__DIRNAME);

//fs.createReadStream('../hooks/commit-msg').pipe(fs.createWriteStream())<commit_msg>Completed (?) Install.js<commit_after>import fs from 'fs';
import path from 'path';

let currentPath = process.env.pwd;

while(fs.existsSync(currentPath)) {
	if(fs.existsSync(currentPath + '/.git'))
	{
		currentPath = currentPath + '/.git/hooks/';
		break;
	}
	else
		currentPath = path.normalize(currentPath + '/..');
}

fs.createReadStream('hooks/commit-msg').pipe(fs.createWriteStream(currentPath + 'commit-msg'));
{'fraction_non_alphanumeric': 0.18262411347517732, 'fraction_numerical': 0.0, 'mean_word_length': 5.348314606741573, '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': '3985471', 'n_tokens_mistral': 195, 'n_tokens_neox': 194, 'n_words': 29}