mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
fd1cfc60bf
commit
0b468953be
2 changed files with 4 additions and 4 deletions
|
|
@ -76,13 +76,13 @@ def _install_hook_script(
|
|||
# If the hooks directory links to a directory outside the
|
||||
# git repo we shouldn't try to mess with it
|
||||
if os.path.commonpath(
|
||||
[os.path.realpath(git_dir), os.path.realpath(hook_path)]
|
||||
) != os.path.realpath(git_dir):
|
||||
[os.path.realpath(git_dir), os.path.realpath(hook_path)],
|
||||
) != os.path.realpath(git_dir):
|
||||
logger.error(
|
||||
'Cowardly refusing to install hook script to a directory '
|
||||
'outside of the git repo.\n'
|
||||
f'hint: {os.path.dirname(hook_path)} is a symbolic link '
|
||||
f'to {os.path.realpath(os.path.dirname(hook_path))}.'
|
||||
f'to {os.path.realpath(os.path.dirname(hook_path))}.',
|
||||
)
|
||||
return 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue