diff --git a/pre_commit/commands/install_uninstall.py b/pre_commit/commands/install_uninstall.py index 1223a43f..152b1fb7 100644 --- a/pre_commit/commands/install_uninstall.py +++ b/pre_commit/commands/install_uninstall.py @@ -77,7 +77,7 @@ def _install_hook_script( # git repo we shouldn't try to mess with it repo_dir = os.path.dirname(os.path.realpath(git_dir)) if os.path.commonpath( - [repo_dir, os.path.realpath(hook_path)] + [repo_dir, os.path.realpath(hook_path)], ) != repo_dir: logger.error( 'Cowardly refusing to install hook script to a directory '