Skip to content

Commit 88559bd

Browse files
author
Warun Kietduriyakul
committed
Bug: phpenv shell not found on the ubuntu
Include commited from @Milly Refer to : #24
1 parent 01a2c1e commit 88559bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/phpenv-install.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ phpenv_script() {
3030

3131
cat <<SH
3232
#!/usr/bin/env bash
33-
export RBENV_ROOT='$root'
33+
export PHPENV_ROOT=\${PHPENV_ROOT:-'$root'}
34+
export RBENV_ROOT="\$PHPENV_ROOT"
3435
exec "\$RBENV_ROOT/libexec/rbenv" "\$@"
3536
SH
3637
}
@@ -77,6 +78,8 @@ else
7778
sed -i -s 's/\.rbenv-version/.phpenv-version/g' "$PHPENV_ROOT"/libexec/rbenv-version-file
7879
sed -i -s 's/\.ruby-version/.php-version/g' "$PHPENV_ROOT"/libexec/rbenv-local
7980
sed -i -s 's/\.ruby-version/.php-version/g' "$PHPENV_ROOT"/libexec/rbenv-version-file
81+
sed -i -e 's/\(^\|[^/]\)rbenv/\1phpenv/g' "$PHPENV_ROOT"/libexec/rbenv-init
82+
sed -i -e 's/\phpenv-commands/rbenv-commands/g' "$PHPENV_ROOT"/libexec/rbenv-init
8083
fi
8184
fi
8285

0 commit comments

Comments
 (0)