This is required for the shims to handle `#!/usr/bin/env python3` in a
shebang, just like `python` is handled currently: it will set
`PYENV_DIR` to the root of the invoked script, which is required for a
`.python-version` script to get picked up from there.
This was rejected for rbenv, where it does not make much sense
(https://github.com/sstephenson/rbenv/pull/735).
Ref: https://github.com/yyuu/pyenv/pull/368#issuecomment-102806837
I was seeing the following occasionally in scripts:
> …/.pyenv/libexec/pyenv-version-file-read: line 12: type: write error: Broken pipe
This patch hopefully improves/fixes this, and it seems better anyway to
just use sed here.
This merges
4d72eefffc
to build a common ancestor for future merges.
This is branched off f48a5b11d7, which was
the last manual merge.
Discussion / initial idea: https://github.com/yyuu/pyenv/pull/286#issuecomment-66565475
This was done using:
# Keep our changes for "unmerged, both added"
for i in $(git status --porcelain | grep '^AA ' | cut -d\ -f2); do
git checkout --ours $i
git add $i
done
# "git mv" rbenv files to our name, keeping the current contents.
for i in $(git status --porcelain | grep '^A ' | sed 's/^A //'); do
ours=${i//rbenv/pyenv}
test -f $ours || { echo "Skipping: $i"; continue; }
git mv -f $i $ours
git reset HEAD $ours
done
I've handled the following then manually:
- rbenv.d/exec/gem-rehash.bash
- rbenv.d/exec/gem-rehash/rubygems_plugin.rb
This should allow to merge rbenv in the future using:
git merge rbenv/master -s recursive -X rename-threshold=5%
I am not sure about the rename-threshold, 25% also worked for one file
I've tested.
Conflicts:
.gitignore
.travis.yml
LICENSE
README.md
src/Makefile.in
test/--version.bats
test/commands.bats
test/completions.bats
test/exec.bats
test/global.bats
test/help.bats
test/hooks.bats
test/init.bats
test/local.bats
test/prefix.bats
test/rehash.bats
test/run
test/shell.bats
test/shims.bats
test/test_helper.bash
test/version-file-read.bats
test/version-file-write.bats
test/version-file.bats
test/version-name.bats
test/version-origin.bats
test/version.bats
test/versions.bats
test/whence.bats
test/which.bats