Skip to content

Commit b9504f2

Browse files
authored
fix(ci): Unlink python before brew install (#18402)
* fix(ci): Unlink python before `brew install` Otherwise it fails to update Python with: ``` ==> Upgrading [email protected] 3.11.4_1 -> 3.11.5 ==> Pouring [email protected] Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/2to3 Target /usr/local/bin/2to3 already exists. You may want to remove it: rm '/usr/local/bin/2to3' To force the link and overwrite all conflicting files: brew link --overwrite [email protected] To list all files that would be deleted: brew link --overwrite --dry-run [email protected] ``` Example: https://github.com/vectordotdev/vector/actions/runs/5995416388/job/16258473755 Signed-off-by: Jesse Szwedko <[email protected]> * shell lint Signed-off-by: Jesse Szwedko <[email protected]> --------- Signed-off-by: Jesse Szwedko <[email protected]>
1 parent 2c5b162 commit b9504f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/environment/bootstrap-macos-10.sh

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ unset HOMEBREW_NO_INSTALL_FROM_API
66

77
brew update
88

9+
# `brew install` attempts to upgrade python as a dependency but fails
10+
# https://github.com/actions/setup-python/issues/577
11+
brew list -1 | grep python | while read -r formula; do brew unlink "$formula"; brew link --overwrite "$formula"; done
12+
913
brew install [email protected] coreutils cue-lang/tap/cue protobuf
1014

1115
gem install bundler

0 commit comments

Comments
 (0)