github: macosx: remove github-installed Python symlinks in /usr/local/bin

installing packages fails as symlinks that brew wants to install already exist

https://github.com/orgs/Homebrew/discussions/3895
This commit is contained in:
Peter Barker 2022-12-26 08:42:10 +11:00 committed by Randy Mackay
parent 6569d16d3c
commit c93f6d9915
1 changed files with 7 additions and 0 deletions

View File

@ -96,6 +96,13 @@ function maybe_prompt_user() {
fi
}
# delete links installed by github in /usr/local/bin; installing or
# upgrading python via brew fails if these links are in place. brew
# auto-updates things when you install other packages which depend on
# more recent versions.
# see https://github.com/orgs/Homebrew/discussions/3895
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
brew update
brew install gawk curl coreutils wget