pre-commit generates the following shebang in the hook:
#!/usr/bin/env python.exe
It works when I have a virtual env activated, but not outside because I install python with pyenv-win that makes python accessible through a python shim installed in %USERPROFILE%\.pyenv\pyenv-win\shims\python.
Right now my workaround is to edit manually the hook and replace "python.exe" with "python". I don't want to change my PATH to have "python.exe" accessible from it because I may change the global python I use with pyenv and I would have to remember to update my PATH in that case.
Is there a command line argument to specify the command to use in the shebang ? (I don't see any with pre-commit --help or pre-commit install --help). If not do you think it would be a good idea to offer such option ?
pre-commit generates the following shebang in the hook:
It works when I have a virtual env activated, but not outside because I install python with pyenv-win that makes python accessible through a
pythonshim installed in%USERPROFILE%\.pyenv\pyenv-win\shims\python.Right now my workaround is to edit manually the hook and replace "python.exe" with "python". I don't want to change my PATH to have "python.exe" accessible from it because I may change the global python I use with pyenv and I would have to remember to update my PATH in that case.
Is there a command line argument to specify the command to use in the shebang ? (I don't see any with
pre-commit --helporpre-commit install --help). If not do you think it would be a good idea to offer such option ?