Skip to content

Commit 960bcc9

Browse files
Fix relative path repos
1 parent b920f3c commit 960bcc9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pre_commit/store.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ def _shallow_clone(self, ref, protocol_version, git_cmd):
154154
def clone(self, repo, ref, deps=()):
155155
"""Clone the given url and checkout the specific ref."""
156156

157+
if os.path.isdir(repo):
158+
repo = os.path.abspath(repo)
159+
157160
def clone_strategy(directory):
158161
env = git.no_git_env()
159162

0 commit comments

Comments
 (0)