pyenv / pyenv-installer

This tool is used to install `pyenv` and friends.
MIT License
3.96k stars 428 forks source link

Add ability to install a specific version of pyenv #126

Closed cavcrosby closed 2 years ago

cavcrosby commented 2 years ago

This pull request is in attempt to have changes made to allow a user to specify a specific version of pyenv to install.

It appears I am not the only one who wants to be able to install a specific version of pyenv. See: #120

The pyenv-doctor, pyenv-virtualenv, and pyenv-which-ext plugins also have tags in their repos, however none of those tags are current (e.g. they are a few years old). So I do not imagine anyone wanting to use a specific version of those plugins, hence they will remain to use the default branch (in this case, master).

The following option and option value were appended to git because after running git clone, git will "advised" the current user that using a tagged version will cause the repo to have a detached head. git -c advice.detachedHead=0 ...

The advisement looks like this:

Cloning into '/home/conner/git/pyenv-installer/bin/.pyenv'...
remote: Enumerating objects: 842, done.
remote: Counting objects: 100% (842/842), done.
remote: Compressing objects: 100% (428/428), done.
remote: Total 842 (delta 476), reused 548 (delta 311), pack-reused 0
Receiving objects: 100% (842/842), 438.13 KiB | 7.18 MiB/s, done.
Resolving deltas: 100% (476/476), done.
Note: switching to '066c05336f3ac6c17e7e696abf0d7de1c3d61ae8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

This is not the prettiest thing to look at. The appended option/option value will temporarily turn this advice off.

I did testing locally on my Linux machine. Maintainers, is there any further testing you wish me todo? Should the README.rst be updated?