Use actual proper path to local git config

This commit is contained in:
GCHQDeveloper581 2026-04-29 12:28:19 +00:00
parent 506d788956
commit dc8a26fea2
No known key found for this signature in database
GPG Key ID: 6222E059A3DF595C

View File

@ -29,7 +29,7 @@ const testDir = path.join(process.cwd() + "/tests/operations/tests/");
const configFile = "/.gitconfig";
let gitUserEmail, gitUserName;
// gitconfig in root is better than global one
let gitConfig = process.cwd() + '.git/config';
let gitConfig = process.cwd() + '/.git/config';
if (!fs.existsSync(gitConfig)) {
gitConfig = process.env.HOME + configFile;
}