Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't suggest chmod +/-x on Windows #686

Closed
jmerdich opened this issue Nov 16, 2021 · 1 comment · Fixed by #689
Closed

Don't suggest chmod +/-x on Windows #686

jmerdich opened this issue Nov 16, 2021 · 1 comment · Fixed by #689

Comments

@jmerdich
Copy link

Some of the executable error messages suggest using chmod +/-x to toggle the executable bits. This works fine on *nix, but not on windows, and the results range from 'command not found' to doing nothing at all.

Eg: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_executables_have_shebangs.py#L66

Instead, this should recommend git add --chmod=+/-x somepath when the hook detects it's running on windows.

@asottile
Copy link
Member

send a patch!

pujitm added a commit to pujitm/pre-commit-hooks that referenced this issue Nov 19, 2021
pujitm added a commit to pujitm/pre-commit-hooks that referenced this issue Nov 19, 2021
pujitm added a commit to pujitm/pre-commit-hooks that referenced this issue Nov 27, 2021
pujitm added a commit to pujitm/pre-commit-hooks that referenced this issue Dec 7, 2021
jmerdich added a commit to jmerdich/pre-commit-hooks that referenced this issue Dec 13, 2021
Follow-up for pre-commit#686 and pre-commit#689.

The previous change resolved when a file was executable but lacked
a shebang, but not vice-versa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants