Commit 24ff49cc by Mislav Marohnić

Support rbenv hook paths that have spaces

Same approach taken in rbenv: sstephenson/rbenv@baf7656d
parent 92b32f54
...@@ -113,10 +113,10 @@ after_install() { ...@@ -113,10 +113,10 @@ after_install() {
after_hooks["${#after_hooks[@]}"]="$hook" after_hooks["${#after_hooks[@]}"]="$hook"
} }
# Load plugin hooks. OLDIFS="$IFS"
for script in $(rbenv-hooks install); do IFS=$'\n' scripts=(`rbenv-hooks install`)
source "$script" IFS="$OLDIFS"
done for script in "${scripts[@]}"; do source "$script"; done
# Set VERSION_NAME from $DEFINITION, if it is not already set. Then # Set VERSION_NAME from $DEFINITION, if it is not already set. Then
......
...@@ -50,9 +50,10 @@ after_uninstall() { ...@@ -50,9 +50,10 @@ after_uninstall() {
after_hooks["${#after_hooks[@]}"]="$hook" after_hooks["${#after_hooks[@]}"]="$hook"
} }
for script in $(rbenv-hooks uninstall); do OLDIFS="$IFS"
source "$script" IFS=$'\n' scripts=(`rbenv-hooks uninstall`)
done IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done
VERSION_NAME="${DEFINITION##*/}" VERSION_NAME="${DEFINITION##*/}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment