Skip to content

Commit

Permalink
Merge pull request pre-commit#689 from pujitm/master
Browse files Browse the repository at this point in the history
Suggest usable call when executable files lack shebang on Windows
  • Loading branch information
asottile authored Dec 7, 2021
2 parents 083b0d8 + 16bc739 commit ccecdbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pre_commit_hooks/check_executables_have_shebangs.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def _message(path: str) -> None:
f'{path}: marked executable but has no (or invalid) shebang!\n'
f" If it isn't supposed to be executable, try: "
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.',
file=sys.stderr,
)
Expand Down

0 comments on commit ccecdbd

Please sign in to comment.