1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-14 14:23:53 -05:00

Revert "rbenv exec: avoid mutating PATH"

It was supposed to fix shelling out to Ruby but it in fact broke another
kind of shelling out to Ruby: invoking the `ruby` binary directly with
the `-S` flag.

Fixes #480

This reverts commit db143bb654.
This commit is contained in:
Mislav Marohnić
2013-11-03 12:18:28 +02:00
parent f1fdb9bbc8
commit 95a039aaaa
3 changed files with 37 additions and 275 deletions

View File

@@ -45,12 +45,10 @@ create_prototype_shim() {
set -e
[ -n "\$RBENV_DEBUG" ] && set -x
opt=""
program="\${0##*/}"
if [ "\$program" = "ruby" ]; then
for arg; do
case "\$arg" in
-S* ) opt=--rubypath ;;
-e* | -- ) break ;;
*/* )
if [ -f "\$arg" ]; then
@@ -63,7 +61,7 @@ if [ "\$program" = "ruby" ]; then
fi
export RBENV_ROOT="$RBENV_ROOT"
exec "$(command -v rbenv)" exec \$opt "\$program" "\$@"
exec "$(command -v rbenv)" exec "\$program" "\$@"
SH
chmod +x "$PROTOTYPE_SHIM_PATH"
}