mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Refuse to install with core.hooksPath set
This commit is contained in:
parent
ac3a37d1a0
commit
f679983012
2 changed files with 19 additions and 0 deletions
|
|
@ -66,6 +66,14 @@ def test_install_hooks_directory_not_present(tempdir_factory):
|
|||
assert os.path.exists(runner.pre_commit_path)
|
||||
|
||||
|
||||
def test_install_refuses_core_hookspath(tempdir_factory):
|
||||
path = git_dir(tempdir_factory)
|
||||
with cwd(path):
|
||||
cmd_output('git', 'config', '--local', 'core.hooksPath', 'hooks')
|
||||
runner = Runner(path, C.CONFIG_FILE)
|
||||
assert install(runner)
|
||||
|
||||
|
||||
@xfailif_no_symlink
|
||||
def test_install_hooks_dead_symlink(
|
||||
tempdir_factory,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue