Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
3ac3141c
Commit
3ac3141c
authored
Jun 22, 2012
by
Robby Russell
Browse files
Merge pull request #1174 from insside/rbenv-homebrew-fix
rbenv plugin now uses 'brew --prefix rbenv' command to find rbenv folder
parents
493238e2
5931f643
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/rbenv/rbenv.plugin.zsh
View file @
3ac3141c
_homebrew-installed
()
{
type
brew &> /dev/null
}
_rbenv-from-homebrew-installed
()
{
brew
--prefix
rbenv &> /dev/null
}
FOUND_RBENV
=
0
for
rbenvdir
in
"
$HOME
/.rbenv"
"/usr/local/rbenv"
"/opt/rbenv"
;
do
rbenvdirs
=(
"
$HOME
/.rbenv"
"/usr/local/rbenv"
"/opt/rbenv"
)
if
_homebrew-installed
&&
_rbenv-from-homebrew-installed
;
then
rbenvdirs
=(
$(
brew
--prefix
rbenv
)
"
${
rbenvdirs
[@]
}
"
)
fi
for
rbenvdir
in
"
${
rbenvdirs
[@]
}
"
;
do
if
[
-d
$rbenvdir
/bin
-a
$FOUND_RBENV
-eq
0
]
;
then
FOUND_RBENV
=
1
export
RBENV_ROOT
=
$rbenvdir
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment