mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 21:33:54 -05:00
Use read -a to split output into an array (#1450)
This commit is contained in:
@@ -33,10 +33,9 @@ export RBENV_VERSION
|
||||
RBENV_COMMAND_PATH="$(rbenv-which "$RBENV_COMMAND")"
|
||||
RBENV_BIN_PATH="${RBENV_COMMAND_PATH%/*}"
|
||||
|
||||
OLDIFS="$IFS"
|
||||
IFS=$'\n' scripts=(`rbenv-hooks exec`)
|
||||
IFS="$OLDIFS"
|
||||
IFS=$'\n' read -d '' -r -a scripts <<<"$(rbenv-hooks exec)" || true
|
||||
for script in "${scripts[@]}"; do
|
||||
# shellcheck disable=SC1090
|
||||
source "$script"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user