diff --git a/clickusagemd.py b/clickusagemd.py index 1feebf9..33f3540 100755 --- a/clickusagemd.py +++ b/clickusagemd.py @@ -2,6 +2,7 @@ import importlib import os +from pathlib import Path from typing import Iterator import click @@ -11,10 +12,10 @@ import toml from clickusagelib.githook import install_hook, uninstall_hook -def find_git_root(path) -> str: +def find_git_root(path) -> Path: git_repo = git.Repo(path, search_parent_directories=True) git_root = git_repo.git.rev_parse("--show-toplevel") - return git_root + return Path(git_root) def iter_commands(