Skip to content

Commit ccecdbd

Browse files
authored
Merge pull request #689 from pujitm/master
Suggest usable call when executable files lack shebang on Windows
2 parents 083b0d8 + 16bc739 commit ccecdbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pre_commit_hooks/check_executables_have_shebangs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def _message(path: str) -> None:
6464
f'{path}: marked executable but has no (or invalid) shebang!\n'
6565
f" If it isn't supposed to be executable, try: "
6666
f'`chmod -x {shlex.quote(path)}`\n'
67+
f' If on Windows, you may also need to: '
68+
f'`git add --chmod=-x {shlex.quote(path)}`\n'
6769
f' If it is supposed to be executable, double-check its shebang.',
6870
file=sys.stderr,
6971
)

0 commit comments

Comments
 (0)