Skip to content

pyenv-virtualenvs and pyenv-virtualenv-prefix error when installed with symlink #307

@andrew-christianson

Description

@andrew-christianson

The construction . "${BASH_SOURCE%/*}"/../libexec/pyenv-virtualenv-realpath, on line 9 of pyenv-virtualenv-prefix and line 10 of pyenv-virtualenvs results in an error if the script is symlinked into a directory on PATH (e.g. installed through Homebrew). Specifically, in the case of v1.1.5 installed through brew install --HEAD pyenv-virtualenv it reports:

/usr/local/bin/pyenv-virtualenvs: line 10: /usr/local/bin/../libexec/pyenv-virtualenv-realpath: No such file or directory

This can be solved by following the symlink if ${BASH_SOURCE} is indeed a link before expanding the path to pyenv-virtualenv-realpath; I'll submit a PR to that effect if that seems like the appropriate solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions