@@ -524,6 +524,21 @@ before_install: |
524524 source multibuild_customize.sh
525525 echo $ENABLE_CONTRIB > contrib.enabled
526526 echo $ENABLE_HEADLESS > headless.enabled
527+
528+ if [ -n "$IS_OSX" ]; then
529+ TAPS="$(brew --repository)/Library/Taps"
530+ if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
531+ rm -rf "$TAPS/caskroom/homebrew-cask"
532+ fi
533+ find "$TAPS" -type d -name .git -exec \
534+ bash -xec '
535+ cd $(dirname '\''{}'\'')
536+ git clean -fxd
537+ git status' \;
538+
539+ brew_cache_cleanup
540+ fi
541+
527542 before_install
528543 # Not interested in travis internal scripts' output
529544 set +x
@@ -552,15 +567,9 @@ before_cache: |
552567 if [ -n "$IS_OSX" ]; then
553568
554569 # When Taps is cached, this dir causes "Error: file exists" on `brew update`
555- rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
556- find "$(brew --repository)/Library/Taps" -type d -name .git -exec \
557- bash -xec '
558- cd $(dirname '\''{}'\'')
559- git status
560- # https://stackoverflow.com/questions/8296710/how-to-ignore-xargs-commands-if-stdin-input-is-empty/19038748#19038748
561- git ls-files --other -z | xargs -0 -n100 git add
562- git commit -a -m "Travis auto changes"
563- [[ -n $(git stash list) ]] && git stash drop' \;
570+ if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
571+ rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
572+ fi
564573
565574 brew_cache_cleanup
566575
0 commit comments