mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-14 13:00:10 -06:00
Fix pre-commit install on subst drives
This commit is contained in:
@@ -52,10 +52,10 @@ def get_root() -> str:
|
||||
# "rev-parse --show-cdup" to get the appropriate path, but must perform
|
||||
# an extra check to see if we are in the .git directory.
|
||||
try:
|
||||
root = os.path.realpath(
|
||||
root = os.path.abspath(
|
||||
cmd_output('git', 'rev-parse', '--show-cdup')[1].strip(),
|
||||
)
|
||||
git_dir = os.path.realpath(get_git_dir())
|
||||
git_dir = os.path.abspath(get_git_dir())
|
||||
except CalledProcessError:
|
||||
raise FatalError(
|
||||
'git failed. Is it installed, and are you in a Git repository '
|
||||
|
||||
Reference in New Issue
Block a user