Skip to content

Commit

Permalink
📖
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed May 22, 2024
1 parent 86da480 commit a9b8a0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/git-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down

0 comments on commit a9b8a0a

Please sign in to comment.