mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Make install -f / --overwrite work.
This commit is contained in:
parent
1d8394afd0
commit
ac735e85e2
4 changed files with 80 additions and 7 deletions
|
|
@ -41,7 +41,14 @@ class Runner(object):
|
|||
|
||||
@cached_property
|
||||
def pre_commit_path(self):
|
||||
return os.path.join(self.git_root, '.git/hooks/pre-commit')
|
||||
return os.path.join(self.git_root, '.git', 'hooks', 'pre-commit')
|
||||
|
||||
@cached_property
|
||||
def pre_commit_legacy_path(self):
|
||||
"""The path in the 'hooks' directory representing the temporary
|
||||
storage for existing pre-commit hooks.
|
||||
"""
|
||||
return self.pre_commit_path + '.legacy'
|
||||
|
||||
@cached_property
|
||||
def cmd_runner(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue