Fix some output strings (#5065)

Commented out check for sudo as it was failing on Travis-CI
Updated version of Ruby to 2.3.3
Reorder install so Ruby gets installed before installing PS as Homebrew relies on Ruby 2.3
Remove sudo check which breaks Travis-CI
This commit is contained in:
Steve Lee 2017-10-09 13:23:29 -07:00 committed by Travis Plunk
parent ff59be3c61
commit 9d5823baeb
2 changed files with 25 additions and 23 deletions

View File

@ -20,12 +20,15 @@ addons:
- pester-tests.xml
install:
# Default 2.0.0 Ruby is buggy
# Default bundler version is buggy
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
rvm install ruby-2.3.3;
rvm --default use 2.3.3;
fi
- pushd tools
- ./install-powershell.sh
- popd
# Default 2.0.0 Ruby is buggy
# Default bundler version is buggy
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm install ruby-2.3.1; rvm use 2.3.1; fi
# spellcheck
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
nvm install 6.4.0 &&

View File

@ -25,10 +25,10 @@ thisinstallerdistro=osx
repobased=true
gitscriptname="installpsh-osx.sh"
echo "\n*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** Current PowerShell Core Version: $currentpshversion"
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
echo "\n*** Arguments used: $* \n\n"
echo "*** Arguments used: $*"
# Let's quit on interrupt of subcommands
trap '
@ -93,14 +93,13 @@ if (( $EUID != 0 )); then
fi
#Check that sudo is available
if [[ "$SUDO" -eq "sudo" ]]; then
$SUDO -v
if [ $? -ne 0]; then
echo "ERROR: You must either be root or be able to use sudo" >&2
exit 5
fi
fi
#if [[ "$SUDO" -eq "sudo" ]]; then
# $SUDO -v
# if [ $? -ne 0 ]; then
# echo "ERROR: You must either be root or be able to use sudo" >&2
# exit 5
# fi
#fi
#END Collect any variation details if required for this distro
@ -110,7 +109,7 @@ fi
##END Check requirements and prerequisites
echo "\n*** Installing PowerShell Core for $DistroBasedOn..."
echo "*** Installing PowerShell Core for $DistroBasedOn..."
#release=`curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v//g | sed s/,//g | sed s/\ //g`
@ -126,6 +125,13 @@ if ! hash brew 2>/dev/null; then
exit 3
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
# Suppress output, it's very noisy on travis-ci
if [[ ! -d $(brew --prefix cask) ]]; then
echo "Installing cask..."
@ -135,13 +141,6 @@ if [[ ! -d $(brew --prefix cask) ]]; then
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
@ -152,7 +151,7 @@ else
fi
if [[ "'$*'" =~ includeide ]] ; then
echo "\n*** Installing VS Code PowerShell IDE..."
echo "*** Installing VS Code PowerShell IDE..."
if [[ ! -d $(brew --prefix visual-studio-code) ]]; then
if ! brew cask install visual-studio-code; then
echo "ERROR: Visual Studio Code failed to install..." >&2
@ -162,7 +161,7 @@ if [[ "'$*'" =~ includeide ]] ; then
brew upgrade visual-studio-code
fi
echo "\n*** Installing VS Code PowerShell Extension"
echo "*** Installing VS Code PowerShell Extension"
code --install-extension ms-vscode.PowerShell
fi