Selaa lähdekoodia

config: check default system paths on windows

Peter Rowlands 4 vuotta sitten
vanhempi
commit
ce59c32f48
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7 0
      dulwich/config.py

+ 7 - 0
dulwich/config.py

@@ -524,6 +524,13 @@ class StackedConfig(Config):
 
         if "GIT_CONFIG_NOSYSTEM" not in os.environ:
             paths.append("/etc/gitconfig")
+            if sys.platform == "win32":
+                paths.extend(
+                    [
+                        "C:/Program Files/Git/etc/gitconfig",
+                        "C:/ProgramData/Git/config",
+                    ]
+                )
 
         backends = []
         for path in paths: