From a9b8a0a0fc587f511af6253eee9ce3000541c4b9 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 22 May 2024 10:58:18 +0200 Subject: [PATCH] :book: --- lib/git-environment.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/git-environment.ts b/lib/git-environment.ts index 4eb57a44..c8d83c9f 100644 --- a/lib/git-environment.ts +++ b/lib/git-environment.ts @@ -103,6 +103,13 @@ export function setupEnvironment( } } + // On Windows the contained Git environment (minGit) ships with a system level + // gitconfig that we can control but on macOS and Linux /etc/gitconfig is used + // as the system-wide configuration file and we're unable to modify it. + // + // So in order to be able to provide our own sane defaults that can be overriden + // by the user's global and local configuration we'll tell Git to use + // dugite-native's custom gitconfig on those platforms. if (process.platform !== 'win32' && !env.GIT_CONFIG_SYSTEM) { env.GIT_CONFIG_SYSTEM = path.join(gitDir, 'etc', 'gitconfig') }