mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #1295 from pre-commit/ap_bash_broken
work around broken bash in azure pipelines
This commit is contained in:
commit
93152218a7
1 changed files with 1 additions and 1 deletions
|
|
@ -307,7 +307,7 @@ EXISTING_COMMIT_RUN = re.compile(
|
||||||
def _write_legacy_hook(path):
|
def _write_legacy_hook(path):
|
||||||
os.makedirs(os.path.join(path, '.git/hooks'), exist_ok=True)
|
os.makedirs(os.path.join(path, '.git/hooks'), exist_ok=True)
|
||||||
with open(os.path.join(path, '.git/hooks/pre-commit'), 'w') as f:
|
with open(os.path.join(path, '.git/hooks/pre-commit'), 'w') as f:
|
||||||
f.write('#!/usr/bin/env bash\necho "legacy hook"\n')
|
f.write(f'{shebang()}\nprint("legacy hook")\n')
|
||||||
make_executable(f.name)
|
make_executable(f.name)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue