Skip to content

Commit e7a6607

Browse files
fix: Correctly symlink python3 to python (#18)
* Use `"${which_python::-1}"` to correctly grab the version. * Use full version of flag names.
1 parent a4ce5d3 commit e7a6607

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

install_python.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ function symlink_python_to_python3 {
8585
which_pip="$(command -v pip3)"
8686

8787
# symlink python to python3
88-
printf "\n### ln -s -f %s %s\n" "${which_python}" "${which_python::-3}"
89-
ln -s -f "${which_python}" "${which_python::-3}"
88+
printf "\n### ln --symbolic --force %s %s\n" "${which_python}" "${which_python::-1}"
89+
ln --symbolic --force "${which_python}" "${which_python::-1}"
9090

9191
# symlink pip to pip3 if no pip exists or it is a different version than pip3
9292
if [[ -n "$(command -v pip)" ]]; then
9393
if [[ "$(pip --version)" = "$(pip3 --version)" ]]; then
9494
return 0
9595
fi
9696
fi
97-
printf "\n### ln -s -f %s %s\n" "${which_pip}" "${which_pip::-1}"
98-
ln -s -f "${which_pip}" "${which_pip::-1}"
97+
printf "\n### ln --symbolic --force %s %s\n" "${which_pip}" "${which_pip::-1}"
98+
ln --symbolic --force "${which_pip}" "${which_pip::-1}"
9999
return 0
100100
}
101101

0 commit comments

Comments
 (0)