ci: fix another issue with preinstalled homebrew packages on Travis

Change-Id: I7aa53d7ac0daadf8eb2b970ae0fe289899aa023d
diff --git a/.travis.yml b/.travis.yml
index b1deb97..22258a3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,10 +58,10 @@
       osx_image: xcode9.4
       env: OSX_VERSION=10.13
     - os: osx
-      osx_image: xcode10
+      osx_image: xcode10.1
       env: OSX_VERSION=10.13
     - os: osx
-      osx_image: xcode10
+      osx_image: xcode10.1
       env: OSX_VERSION=10.13 USE_OPENSSL_1_1=yes
 
   allow_failures:
@@ -92,11 +92,13 @@
 before_script:
   - if [[ ${TRAVIS_OS_NAME} == linux ]]; then export NODE_LABELS="Linux Ubuntu Ubuntu-16.04"; fi
   - if [[ ${TRAVIS_OS_NAME} == osx ]]; then export NODE_LABELS="OSX OSX-${OSX_VERSION}"; fi
-  - if [[ ${OSX_VERSION} == 10.12 ]]; then brew update; fi
+  - if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew update; fi
   # workaround for https://github.com/Homebrew/homebrew-core/issues/26358
   - if [[ ${OSX_VERSION} == 10.12 ]]; then brew outdated python || brew upgrade python; fi
   # workaround for https://github.com/travis-ci/travis-ci/issues/6688
   - if [[ ${OSX_VERSION} == 10.12 ]]; then /usr/bin/yes | pip2 uninstall numpy || true; fi
+  # workaround for https://github.com/travis-ci/travis-ci/issues/8826
+  - if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew cask uninstall --force oclint || true; fi
   - if [[ -n ${COMPILER} ]]; then export CXX=${COMPILER}; fi
   - ${CXX:-c++} --version
   - python --version