Fix git safe directory

This commit is contained in:
VirtuBox
2022-04-28 12:10:33 +02:00
parent 30adb81a81
commit 35a0e4f1e8

View File

@@ -19,6 +19,8 @@ class WOGit:
for path in paths: for path in paths:
global git global git
wogit = git.bake("-C", "{0}".format(path)) wogit = git.bake("-C", "{0}".format(path))
wogitsafe = git.bake("--global --add safe.directory",
"{0}".format(path))
if os.path.isdir(path): if os.path.isdir(path):
if not os.path.isdir(path + "/.git"): if not os.path.isdir(path + "/.git"):
try: try:
@@ -29,6 +31,7 @@ class WOGit:
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to git init at {0}" Log.error(self, "Unable to git init at {0}"
.format(path)) .format(path))
wogitsafe
status = wogit.status("-s") status = wogit.status("-s")
if len(status.splitlines()) > 0: if len(status.splitlines()) > 0:
try: try: