Merge pull request #2612 from laggardkernel/bugfix/realpath-in-versions

Fix link resolving in pyenv-versions
This commit is contained in:
native-api 2023-02-06 20:09:22 +03:00 committed by GitHub
commit fcd7806529
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 13 deletions

View file

@ -17,7 +17,7 @@ jobs:
- "3.11"
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Normally, we would use the superbly maintained...
# - uses: actions/setup-python@v2
# with:

View file

@ -6,7 +6,7 @@ jobs:
outputs:
versions: ${{steps.modified-versions.outputs.versions}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch origin "$GITHUB_BASE_REF"
- shell: bash
run: >
@ -30,7 +30,7 @@ jobs:
os: ["macos-11", "macos-12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
#envvars
export PYENV_ROOT="$GITHUB_WORKSPACE"
@ -90,7 +90,7 @@ jobs:
os: ["ubuntu-20.04", "ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
#envvars
export PYENV_ROOT="$GITHUB_WORKSPACE"

View file

@ -16,7 +16,7 @@ jobs:
- macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Normally, we would use the superbly maintained...
# - uses: actions/setup-python@v2
# with:
@ -42,3 +42,8 @@ jobs:
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: |
make test
- env:
PYENV_NATIVE_EXT: 1
run: |
(cd src; ./configure; make)
bats/bin/bats test/{pyenv,hooks,versions}.bats

View file

@ -17,7 +17,7 @@ jobs:
- "3.11"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Normally, we would use the superbly maintained...
# - uses: actions/setup-python@v2
# with:

View file

@ -112,7 +112,7 @@ print_version() {
if [[ -L "$path" ]]; then
# Only resolve the link itself for printing, do not resolve further.
# Doing otherwise would misinform the user of what the link contains.
version_repr="$version --> $(resolve_link "$path")"
version_repr="$version --> $(readlink "$path")"
else
version_repr="$version"
fi
@ -157,12 +157,12 @@ for path in "${versions_dir_entries[@]}"; do
print_version "${path##*/}" "$path"
# virtual environments created by anaconda/miniconda/pyenv-virtualenv
if [[ -z $skip_envs ]]; then
for env_path in "${path}/envs/"*; do
if [ -d "${env_path}" ]; then
print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}"
fi
done
fi
for env_path in "${path}/envs/"*; do
if [ -d "${env_path}" ]; then
print_version "${env_path#${PYENV_ROOT}/versions/}" "${env_path}"
fi
done
fi
fi
done
shopt -u dotglob nullglob