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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user