Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use readarray in bash v4+ to avoid rbenv init hanging
For just a handful of people, rbenv init would hang indefinitely. Turning on debugging output suggested that the `read` expression to split PATH into a bash array was hanging, but I could never reproduce this myself. Instead, this uses bash v4+ `readarray` if it's available, or falls back to bash v3 `read` with the default DELIM being a newline character. This will cause a regression if any PATH entries contain a literal newline character, but hopefully people are not relying on such paths.
- Loading branch information