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" - "3.11"
runs-on: macos-11 runs-on: macos-11
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
# Normally, we would use the superbly maintained... # Normally, we would use the superbly maintained...
# - uses: actions/setup-python@v2 # - uses: actions/setup-python@v2
# with: # with:

View file

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

View file

@ -16,7 +16,7 @@ jobs:
- macos-11 - macos-11
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
# Normally, we would use the superbly maintained... # Normally, we would use the superbly maintained...
# - uses: actions/setup-python@v2 # - uses: actions/setup-python@v2
# with: # with:
@ -42,3 +42,8 @@ jobs:
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
- run: | - run: |
make test 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" - "3.11"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
# Normally, we would use the superbly maintained... # Normally, we would use the superbly maintained...
# - uses: actions/setup-python@v2 # - uses: actions/setup-python@v2
# with: # with:

View file

@ -112,7 +112,7 @@ print_version() {
if [[ -L "$path" ]]; then if [[ -L "$path" ]]; then
# Only resolve the link itself for printing, do not resolve further. # Only resolve the link itself for printing, do not resolve further.
# Doing otherwise would misinform the user of what the link contains. # Doing otherwise would misinform the user of what the link contains.
version_repr="$version --> $(resolve_link "$path")" version_repr="$version --> $(readlink "$path")"
else else
version_repr="$version" version_repr="$version"
fi fi