From 86da4800d4d1659502c076ff14d89381c71b2e36 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 15:21:26 +0200 Subject: [PATCH] Use dugite-native's custom system config on Windows --- lib/git-environment.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/git-environment.ts b/lib/git-environment.ts index ae4f4a57..4eb57a44 100644 --- a/lib/git-environment.ts +++ b/lib/git-environment.ts @@ -103,6 +103,10 @@ export function setupEnvironment( } } + if (process.platform !== 'win32' && !env.GIT_CONFIG_SYSTEM) { + env.GIT_CONFIG_SYSTEM = path.join(gitDir, 'etc', 'gitconfig') + } + if (process.platform === 'darwin' || process.platform === 'linux') { // templates are used to populate your .git folder // when a repository is initialized locally