Skip to content

Commit 9d5823b

Browse files
SteveL-MSFTTravisEz13
authored andcommitted
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
1 parent ff59be3 commit 9d5823b

2 files changed

Lines changed: 25 additions & 23 deletions

File tree

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ addons:
2020
- pester-tests.xml
2121

2222
install:
23+
# Default 2.0.0 Ruby is buggy
24+
# Default bundler version is buggy
25+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
26+
rvm install ruby-2.3.3;
27+
rvm --default use 2.3.3;
28+
fi
2329
- pushd tools
2430
- ./install-powershell.sh
2531
- popd
26-
# Default 2.0.0 Ruby is buggy
27-
# Default bundler version is buggy
28-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm install ruby-2.3.1; rvm use 2.3.1; fi
2932
# spellcheck
3033
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
3134
nvm install 6.4.0 &&

tools/installpsh-osx.sh

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ thisinstallerdistro=osx
2525
repobased=true
2626
gitscriptname="installpsh-osx.sh"
2727

28-
echo "\n*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
28+
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
2929
echo "*** Current PowerShell Core Version: $currentpshversion"
3030
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
31-
echo "\n*** Arguments used: $* \n\n"
31+
echo "*** Arguments used: $*"
3232

3333
# Let's quit on interrupt of subcommands
3434
trap '
@@ -93,14 +93,13 @@ if (( $EUID != 0 )); then
9393
fi
9494

9595
#Check that sudo is available
96-
if [[ "$SUDO" -eq "sudo" ]]; then
97-
98-
$SUDO -v
99-
if [ $? -ne 0]; then
100-
echo "ERROR: You must either be root or be able to use sudo" >&2
101-
exit 5
102-
fi
103-
fi
96+
#if [[ "$SUDO" -eq "sudo" ]]; then
97+
# $SUDO -v
98+
# if [ $? -ne 0 ]; then
99+
# echo "ERROR: You must either be root or be able to use sudo" >&2
100+
# exit 5
101+
# fi
102+
#fi
104103

105104
#END Collect any variation details if required for this distro
106105

@@ -110,7 +109,7 @@ fi
110109

111110
##END Check requirements and prerequisites
112111

113-
echo "\n*** Installing PowerShell Core for $DistroBasedOn..."
112+
echo "*** Installing PowerShell Core for $DistroBasedOn..."
114113

115114
#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`
116115

@@ -126,6 +125,13 @@ if ! hash brew 2>/dev/null; then
126125
exit 3
127126
fi
128127

128+
# Suppress output, it's very noisy on travis-ci
129+
echo "Refreshing Homebrew cache..."
130+
if ! brew update > /dev/null; then
131+
echo "ERROR: Refreshing Homebrew cache failed..." >&2
132+
exit 2
133+
fi
134+
129135
# Suppress output, it's very noisy on travis-ci
130136
if [[ ! -d $(brew --prefix cask) ]]; then
131137
echo "Installing cask..."
@@ -135,13 +141,6 @@ if [[ ! -d $(brew --prefix cask) ]]; then
135141
fi
136142
fi
137143

138-
# Suppress output, it's very noisy on travis-ci
139-
echo "Refreshing Homebrew cache..."
140-
if ! brew update >/dev/null; then
141-
echo "ERROR: Refreshing Homebrew cache failed..." >&2
142-
exit 2
143-
fi
144-
145144
if ! hash powershell 2>/dev/null; then
146145
echo "Installing PowerShell..."
147146
if ! brew cask install powershell; then
@@ -152,7 +151,7 @@ else
152151
fi
153152

154153
if [[ "'$*'" =~ includeide ]] ; then
155-
echo "\n*** Installing VS Code PowerShell IDE..."
154+
echo "*** Installing VS Code PowerShell IDE..."
156155
if [[ ! -d $(brew --prefix visual-studio-code) ]]; then
157156
if ! brew cask install visual-studio-code; then
158157
echo "ERROR: Visual Studio Code failed to install..." >&2
@@ -162,7 +161,7 @@ if [[ "'$*'" =~ includeide ]] ; then
162161
brew upgrade visual-studio-code
163162
fi
164163

165-
echo "\n*** Installing VS Code PowerShell Extension"
164+
echo "*** Installing VS Code PowerShell Extension"
166165
code --install-extension ms-vscode.PowerShell
167166
fi
168167

0 commit comments

Comments
 (0)