From 5986ece6d2f59d3b6c57ea5662ac88b6cc4f7e8d Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 28 Apr 2022 13:37:01 +0200 Subject: [PATCH] Fix .gitconfig path --- wo/core/git.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wo/core/git.py b/wo/core/git.py index e8096e1..02fa004 100644 --- a/wo/core/git.py +++ b/wo/core/git.py @@ -1,5 +1,6 @@ """WordOps GIT module""" import os +from pathlib import Path from sh import ErrorReturnCode, git from wo.core.logging import Log @@ -30,7 +31,8 @@ class WOGit: Log.debug(self, "{0}".format(e)) Log.error(self, "Unable to git init at {0}" .format(path)) - if not WOFileUtils.grep(self, "~/.gitconfig", + if not WOFileUtils.grep(self, + "{0}/.gitconfig".format(Path.home()), "{0}".format(path)): git.config("--global", "--add", "safe.directory", "{0}".format(path))