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:
parent
ff59be3c61
commit
9d5823baeb
@ -20,12 +20,15 @@ addons:
|
|||||||
- pester-tests.xml
|
- pester-tests.xml
|
||||||
|
|
||||||
install:
|
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
|
- pushd tools
|
||||||
- ./install-powershell.sh
|
- ./install-powershell.sh
|
||||||
- popd
|
- 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
|
# spellcheck
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||||
nvm install 6.4.0 &&
|
nvm install 6.4.0 &&
|
||||||
|
@ -25,10 +25,10 @@ thisinstallerdistro=osx
|
|||||||
repobased=true
|
repobased=true
|
||||||
gitscriptname="installpsh-osx.sh"
|
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 "*** Current PowerShell Core Version: $currentpshversion"
|
||||||
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
|
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
|
||||||
echo "\n*** Arguments used: $* \n\n"
|
echo "*** Arguments used: $*"
|
||||||
|
|
||||||
# Let's quit on interrupt of subcommands
|
# Let's quit on interrupt of subcommands
|
||||||
trap '
|
trap '
|
||||||
@ -93,14 +93,13 @@ if (( $EUID != 0 )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Check that sudo is available
|
#Check that sudo is available
|
||||||
if [[ "$SUDO" -eq "sudo" ]]; then
|
#if [[ "$SUDO" -eq "sudo" ]]; then
|
||||||
|
# $SUDO -v
|
||||||
$SUDO -v
|
# if [ $? -ne 0 ]; then
|
||||||
if [ $? -ne 0]; then
|
# echo "ERROR: You must either be root or be able to use sudo" >&2
|
||||||
echo "ERROR: You must either be root or be able to use sudo" >&2
|
# exit 5
|
||||||
exit 5
|
# fi
|
||||||
fi
|
#fi
|
||||||
fi
|
|
||||||
|
|
||||||
#END Collect any variation details if required for this distro
|
#END Collect any variation details if required for this distro
|
||||||
|
|
||||||
@ -110,7 +109,7 @@ fi
|
|||||||
|
|
||||||
##END Check requirements and prerequisites
|
##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`
|
#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
|
exit 3
|
||||||
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
|
||||||
|
|
||||||
# Suppress output, it's very noisy on travis-ci
|
# Suppress output, it's very noisy on travis-ci
|
||||||
if [[ ! -d $(brew --prefix cask) ]]; then
|
if [[ ! -d $(brew --prefix cask) ]]; then
|
||||||
echo "Installing cask..."
|
echo "Installing cask..."
|
||||||
@ -135,13 +141,6 @@ if [[ ! -d $(brew --prefix cask) ]]; then
|
|||||||
fi
|
fi
|
||||||
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
|
if ! hash powershell 2>/dev/null; then
|
||||||
echo "Installing PowerShell..."
|
echo "Installing PowerShell..."
|
||||||
if ! brew cask install powershell; then
|
if ! brew cask install powershell; then
|
||||||
@ -152,7 +151,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "'$*'" =~ includeide ]] ; then
|
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 [[ ! -d $(brew --prefix visual-studio-code) ]]; then
|
||||||
if ! brew cask install visual-studio-code; then
|
if ! brew cask install visual-studio-code; then
|
||||||
echo "ERROR: Visual Studio Code failed to install..." >&2
|
echo "ERROR: Visual Studio Code failed to install..." >&2
|
||||||
@ -162,7 +161,7 @@ if [[ "'$*'" =~ includeide ]] ; then
|
|||||||
brew upgrade visual-studio-code
|
brew upgrade visual-studio-code
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "\n*** Installing VS Code PowerShell Extension"
|
echo "*** Installing VS Code PowerShell Extension"
|
||||||
code --install-extension ms-vscode.PowerShell
|
code --install-extension ms-vscode.PowerShell
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user