mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-07 20:26:54 +00:00
Update help for 'chmod' changes for shebang scripts on Windows
This commit is contained in:
parent
0a88f14e07
commit
cd6d19fe40
2 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ def _message(path: str) -> None:
|
||||||
f" If it isn't supposed to be executable, try: "
|
f" If it isn't supposed to be executable, try: "
|
||||||
f'`chmod -x {shlex.quote(path)}`\n'
|
f'`chmod -x {shlex.quote(path)}`\n'
|
||||||
f' If on Windows, you may also need to: '
|
f' If on Windows, you may also need to: '
|
||||||
f'`git add --chmod=-x {shlex.quote(path)}`\n'
|
f'`git update-index --chmod=-x {shlex.quote(path)}`\n'
|
||||||
f' If it is supposed to be executable, double-check its shebang.',
|
f' If it is supposed to be executable, double-check its shebang.',
|
||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ def _message(path: str) -> None:
|
||||||
f'{path}: has a shebang but is not marked executable!\n'
|
f'{path}: has a shebang but is not marked executable!\n'
|
||||||
f' If it is supposed to be executable, try: '
|
f' If it is supposed to be executable, try: '
|
||||||
f'`chmod +x {shlex.quote(path)}`\n'
|
f'`chmod +x {shlex.quote(path)}`\n'
|
||||||
|
f' If on Windows, you may also need to: '
|
||||||
|
f'`git update-index --chmod=+x {shlex.quote(path)}`\n'
|
||||||
f' If it not supposed to be executable, double-check its shebang '
|
f' If it not supposed to be executable, double-check its shebang '
|
||||||
f'is wanted.\n',
|
f'is wanted.\n',
|
||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue