mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
port hook template to bash
this avoids some version-specific code in python this also makes the bootstrap script slightly more portable
This commit is contained in:
parent
ef7b126ee3
commit
e622f793c3
3 changed files with 20 additions and 49 deletions
|
|
@ -278,11 +278,7 @@ def test_environment_not_sourced(tempdir_factory, store):
|
|||
hook = os.path.join(path, '.git/hooks/pre-commit')
|
||||
with open(hook) as f:
|
||||
src = f.read()
|
||||
src = re.sub(
|
||||
'\nINSTALL_PYTHON =.*\n',
|
||||
'\nINSTALL_PYTHON = "/dne"\n',
|
||||
src,
|
||||
)
|
||||
src = re.sub('\nINSTALL_PYTHON=.*\n', '\nINSTALL_PYTHON="/dne"\n', src)
|
||||
with open(hook, 'w') as f:
|
||||
f.write(src)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue