You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect shebang in .git/hooks/pre-commit for python3 only installations #878
hmmm I just thought of another case while working on this that might not work. Some distributions (for instance arch) install python 3.x as /usr/bin/python and won't (?) necessarily have a /usr/bin/python3 executable
I'll have to think about this some more -- maybe inspecting sys.executable is necessary. Maybe something like this
Activity
asottile commentedon Dec 4, 2018
hmm! that's a good point I hadn't thought of but presents some issues I can think of:
pythonand notpython3INSTALL_PYTHONmight be ephemeral, it's why there's three options for detectingpre-commitin the scriptthat said, I think we can get this right, probably by inspecting
sys.executableand determining what possible values could be used.asottile commentedon Dec 4, 2018
Maybe something like this?
fristedt commentedon Dec 5, 2018
Thanks for the quick reply! I believe that would solve my problem.
asottile commentedon Dec 10, 2018
hmmm I just thought of another case while working on this that might not work. Some distributions (for instance
arch) install python 3.x as/usr/bin/pythonand won't (?) necessarily have a/usr/bin/python3executableI'll have to think about this some more -- maybe inspecting
sys.executableis necessary. Maybe something like thisasottile commentedon Dec 25, 2018
@fristedt can you try out the branch in #893?
fristedt commentedon Jan 2, 2019
Tested, it works. Thanks @asottile!
asottile commentedon Jan 8, 2019
This has been released as part of v1.14.0 🎉 -- thanks again!