mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 21:33:54 -05:00
Use parameter expansion for basename + dirname
These are built-ins, and they're used elsewhere in the code.
This commit is contained in:
@@ -5,8 +5,8 @@ abs_dirname() {
|
|||||||
local path="$1"
|
local path="$1"
|
||||||
|
|
||||||
while [ -n "$path" ]; do
|
while [ -n "$path" ]; do
|
||||||
cd "$(dirname "$path")"
|
cd "${path%/*}"
|
||||||
local name="$(basename "$path")"
|
local name="${path##*/}"
|
||||||
path="$(readlink "$name" || true)"
|
path="$(readlink "$name" || true)"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user