File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,31 @@ source module ci/etc/integration-tests-config.sh
2121source module ci/lib/io.sh
2222source module ci/kokoro/lib/vcpkg.sh
2323
24+ # ===== START HOMEBREW FIXES =====
25+ echo " == Attempting to fix Homebrew environment IN cmake-vcpkg.sh"
26+
27+ # 1. Fix Git Origins as suggested by brew doctor
28+ echo " == DEBUG: Setting Homebrew git origins"
29+ git -C " /usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew || echo " Failed to set Homebrew origin"
30+ git -C " /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core || echo " Failed to set homebrew-core origin"
31+
32+ # 2. Untap unnecessary taps as suggested by brew doctor
33+ echo " == DEBUG: Untapping unnecessary taps"
34+ brew untap homebrew/cask --force || echo " Failed to untap homebrew/cask"
35+ brew untap homebrew/core --force || echo " Failed to untap homebrew/core"
36+ brew untap homebrew/cask-versions --force || echo " Failed to untap homebrew/cask-versions"
37+
38+ # 3. Clean up broken symlinks and scrub the cache
39+ echo " == DEBUG: Cleaning up Homebrew"
40+ brew cleanup -s || echo " brew cleanup failed"
41+
42+ # 4. Forcefully reset Homebrew
43+ echo " == DEBUG: Running brew update-reset"
44+ brew update-reset
45+
46+ echo " == DEBUG: Homebrew environment fixes complete IN cmake-vcpkg.sh"
47+ # ===== END HOMEBREW FIXES =====
48+
2449readonly SOURCE_DIR=" ."
2550readonly BINARY_DIR=" cmake-out/macos-vcpkg"
2651
You can’t perform that action at this time.
0 commit comments