Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[python] Edit pyenv virtualenv-init check to support non-brew installations #1433
If the pyenv virtualenv plugin is installed using the pyenv-installer
Using the pyenv
If the pyenv virtualenv plugin is installed using the [pyenv-installer] app script or directly via a [Git clone], then the pyenv-virtualenv-init executable, that the `pyenv virtualenv-init` command uses, will not exist in the user's PATH and therefore cannot be found using `$commands[pyenv-virtualenv-init]`. Installing the pyenv-virtualenv plugin in this manner is common among Linux users. Using the pyenv `commands` command, which lists all commands pyenv can run, we can find if the virtualenv-init command is available to pyenv and subsequently the virtualenv plugin, without relying on pyenv-virtualenv-init to exist in the user's PATH. : https://github.com/pyenv/pyenv-installer : https://github.com/pyenv/pyenv-virtualenv#installing-as-a-pyenv-plugin
Personally, I am not a fan of
I'll make a followup PR little later with relevant tweaks.
One other change I'd like to suggest: the check for the
This is returning
But this PR just got merged, so does this need to be a new PR now?
As inlined doc says, it defaults to
So to disable, you'll have to explicitly specify
This has been done to stay compatible with previous behavior (when it wasn't backed by a