mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 20:16:53 +00:00
Merge pull request #689 from pujitm/master
Suggest usable call when executable files lack shebang on Windows
This commit is contained in:
commit
ccecdbda02
1 changed files with 2 additions and 0 deletions
|
|
@ -64,6 +64,8 @@ def _message(path: str) -> None:
|
||||||
f'{path}: marked executable but has no (or invalid) shebang!\n'
|
f'{path}: marked executable but has no (or invalid) shebang!\n'
|
||||||
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'`git add --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,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue