From 2f8cb2cf1f093e955a72babf0b65a07f84f33522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20M=C3=A1t=C3=A9=20R=C3=B3bert?= Date: Fri, 7 Jul 2023 16:18:02 +0200 Subject: [PATCH] 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> --- bin/pyenv-link-version | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/pyenv-link-version b/bin/pyenv-link-version index 55a1102d..45fd4f67 100755 --- a/bin/pyenv-link-version +++ b/bin/pyenv-link-version @@ -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