Update brew before installing powershell in installpsh-osx.sh (#4506)

This commit is contained in:
Travis Plunk authored and Dongbo Wang committed 2017-08-08 09:22:02 -07:00
1 parent 649ff285ee
commit df379f29c7
1 file changed
+8
+8
View File
@@ -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