@@ -149,19 +149,20 @@ DEFINITION="${ARGUMENTS[0]}"
149
149
# after the installation process.
150
150
declare -a before_hooks after_hooks
151
151
152
+ # shellcheck disable=SC2317
152
153
before_install () {
153
154
local hook=" $1 "
154
155
before_hooks[" ${# before_hooks[@]} " ]=" $hook "
155
156
}
156
157
158
+ # shellcheck disable=SC2317
157
159
after_install () {
158
160
local hook=" $1 "
159
161
after_hooks[" ${# after_hooks[@]} " ]=" $hook "
160
162
}
161
163
162
- OLDIFS=" $IFS "
163
- IFS=$' \n ' scripts=(` rbenv-hooks install` )
164
- IFS=" $OLDIFS "
164
+ IFS=$' \n ' read -d ' ' -r -a scripts <<< " $(rbenv-hooks install)" || true
165
+ # shellcheck disable=SC1090
165
166
for script in " ${scripts[@]} " ; do source " $script " ; done
166
167
167
168
@@ -177,7 +178,7 @@ PREFIX="${RBENV_ROOT}/versions/${VERSION_NAME}"
177
178
if [ -d " ${PREFIX} /bin" ]; then
178
179
if [ -z " $FORCE " ] && [ -z " $SKIP_EXISTING " ]; then
179
180
echo " rbenv: $PREFIX already exists" >&2
180
- read -p " continue with installation? (y/N) "
181
+ read -rp " continue with installation? (y/N) "
181
182
182
183
case " $REPLY " in
183
184
y* | Y* ) ;;
@@ -241,7 +242,7 @@ if [ "$STATUS" == "2" ]; then
241
242
echo " See all available versions with \` rbenv install --list'."
242
243
echo
243
244
echo -n " If the version you need is missing, try upgrading ruby-build"
244
- if [ " $here " != " ${here# $(brew --prefix 2>/ dev/ null)} " ]; then
245
+ if [ " $here " != " ${here# " $( brew --prefix 2> /dev/null) " } " ]; then
245
246
printf " :\n\n"
246
247
echo " brew upgrade ruby-build"
247
248
elif [ -d " ${here} /.git" ]; then
0 commit comments