Commit 24ff49cc authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Support rbenv hook paths that have spaces

Same approach taken in rbenv: sstephenson/rbenv@baf7656d
parent 92b32f54
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -113,10 +113,10 @@ after_install() {
  after_hooks["${#after_hooks[@]}"]="$hook"
}

# Load plugin hooks.
for script in $(rbenv-hooks install); do
  source "$script"
done
OLDIFS="$IFS"
IFS=$'\n' scripts=(`rbenv-hooks install`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done


# Set VERSION_NAME from $DEFINITION, if it is not already set. Then
+4 −3
Original line number Diff line number Diff line
@@ -50,9 +50,10 @@ after_uninstall() {
  after_hooks["${#after_hooks[@]}"]="$hook"
}

for script in $(rbenv-hooks uninstall); do
  source "$script"
done
OLDIFS="$IFS"
IFS=$'\n' scripts=(`rbenv-hooks uninstall`)
IFS="$OLDIFS"
for script in "${scripts[@]}"; do source "$script"; done


VERSION_NAME="${DEFINITION##*/}"