Handle osx specific ln option name (#1)

On OSX `ln` does not have `--symbolic` only `-s`.

* bin/pyenv-link-version

---------

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
This commit is contained in:
Mészáros Máté Róbert 2023-07-07 16:18:02 +02:00 committed by GitHub
parent b8d8dee191
commit 2f8cb2cf1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,7 +131,14 @@ pyenv_prefix_path="$PYENV_ROOT/versions/$venv_name"
# link to pyenv version directory
if [ -z "$dry" ]; then
ln --symbolic "$venv_dir" "$pyenv_prefix_path"
# Handle OS types
case "$(uname -s)" in
Darwin*)
# long form flags aren't supported
ln -s "$venv_dir" "$pyenv_prefix_path";;
*)
ln --symbolic "$venv_dir" "$pyenv_prefix_path";;
esac
fi
# output