Use proper path to local git config

This commit is contained in:
GCHQDeveloper581 2026-04-29 12:19:47 +00:00
parent 96b269491e
commit 506d788956
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"; const configFile = "/.gitconfig";
let gitUserEmail, gitUserName; let gitUserEmail, gitUserName;
// gitconfig in root is better than global one // gitconfig in root is better than global one
let gitConfig = process.cwd() + configFile; let gitConfig = process.cwd() + '.git/config';
if (!fs.existsSync(gitConfig)) { if (!fs.existsSync(gitConfig)) {
gitConfig = process.env.HOME + configFile; gitConfig = process.env.HOME + configFile;
} }