mirror of
https://github.com/pyenv/pyenv.git
synced 2026-09-10 07:36:16 -04: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…
Reference in a new issue