mirror of
https://github.com/rbenv/rbenv.git
synced 2025-06-19 19:58:03 +02:00
Skip version aliases while rehashing
Because a version alias points to another version in rbenv, its executables will get included in the rehash process anyway. I hoped that this results in rehash speedup because fewer directories get processed on a system with lots of aliases (I have 9), but the truth is I didn't witness any speedup. It's likely that the overhead of `rbenv-versions --skip-aliases` makes up for any performance gain that we could have had here.
This commit is contained in:
parent
23083ff9f8
commit
f133fda91f
1 changed files with 6 additions and 3 deletions
|
@ -81,9 +81,12 @@ remove_outdated_shims() {
|
|||
|
||||
# List basenames of executables for every Ruby version
|
||||
list_executable_names() {
|
||||
local file
|
||||
for file in "$RBENV_ROOT"/versions/*/bin/*; do
|
||||
echo "${file##*/}"
|
||||
local version file
|
||||
rbenv-versions --bare --skip-aliases | \
|
||||
while read version; do
|
||||
for file in "${RBENV_ROOT}/versions/${version}/bin/"*; do
|
||||
echo "${file##*/}"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue