From df379f29c79c8a68c690a9571651f0bca1db3acd Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 8 Aug 2017 09:22:02 -0700 Subject: [PATCH] Update brew before installing powershell in installpsh-osx.sh (#4506) --- tools/installpsh-osx.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/installpsh-osx.sh b/tools/installpsh-osx.sh index 48595bba9..3aef2e4a3 100755 --- a/tools/installpsh-osx.sh +++ b/tools/installpsh-osx.sh @@ -131,9 +131,17 @@ if [[ ! -d $(brew --prefix cask) ]]; then echo "Installing cask..." if ! brew tap caskroom/cask >/dev/null; then echo "ERROR: Cask failed to install! Cannot install powershell..." >&2 + exit 2 fi fi +# Suppress output, it's very noisy on travis-ci +echo "Refreshing Homebrew cache..." +if ! brew update >/dev/null; then + echo "ERROR: Refreshing Homebrew cache failed..." >&2 + exit 2 +fi + if ! hash powershell 2>/dev/null; then echo "Installing PowerShell..." if ! brew cask install powershell; then