link python executable on macOS if needed

This commit is contained in:
JesseBot 2023-06-04 14:07:52 +02:00
parent b08bfdca50
commit 784bbf241e
No known key found for this signature in database
GPG key ID: C01D207CE04D55D9

View file

@ -55,6 +55,12 @@ if [[ $(uname) == *"Darwin"* ]]; then
if [ $(uname -a | grep arm > /dev/null ; echo $?) -eq 0 ]; then
# On apple silicon: brew default installs here
export PATH=/opt/homebrew/bin:$PATH
else
if [ ! -f "/usr/local/bin/python" ]; then
# this will link python3.11 to python which will fix poetry issues
# ref: https://stackoverflow.com/a/74582011/3547184
ln -s -f /usr/local/bin/python3.11 /usr/local/bin/python
fi
fi
# Load GNU sed, called gsed, instead of MacOS's POSIX sed