mirror of
https://github.com/pyenv/pyenv.git
synced 2026-10-02 23:41:06 +09:00
Avoid extra iteration for argument with a trailing slash
This commit is contained in:
parent
48e70e1fe9
commit
1a591b3963
@ -17,6 +17,7 @@ find_local_version_file() {
|
||||
# (https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_16)
|
||||
# even though few UNIX variants do that
|
||||
local unc; [[ $root =~ ^//[^/] && ! / -ef // ]] && unc=1
|
||||
root="${root%/}"
|
||||
# when testing root, $root is ""
|
||||
while true; do
|
||||
# don't test //.python-version if // is special
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user