mirror of
https://github.com/pyenv/pyenv.git
synced 2026-04-06 13:45:11 +09:00
rehash: drop redundant sort -u from make_shims call (#3410)
register_shim() already deduplicates via associative array (bash 4+) or by checking if a shim already exists (bash 3.2). The sort -u pipe in the make_shims call is thus redundant -- the dedup happens downstream regardless. Shim creation is order-independent and idempotent, so sorting has no semantic effect either. Saves one subprocess fork during every rehash invocation.
This commit is contained in:
parent
43e83b52a2
commit
47871b2dc3
@ -196,7 +196,7 @@ shopt -s nullglob
|
||||
create_prototype_shim
|
||||
remove_outdated_shims
|
||||
# shellcheck disable=SC2046
|
||||
make_shims $(list_executable_names | sort -u)
|
||||
make_shims $(list_executable_names)
|
||||
|
||||
|
||||
# Allow plugins to register shims.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user