Skip to content

Commit ea088a9

Browse files
native-apiskvark
authored andcommitted
Don't print bogus error message when cache warmup is complete
1 parent d3c3882 commit ea088a9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

travis_osx_brew_cache.sh

+10-3
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,19 @@ function brew_go_bootstrap_mode {
223223
#Can't just `exit` because that would terminate the build without saving the cache
224224
#Have to replace further actions with no-ops
225225

226+
local MESSAGE=""; if [ "$EXIT_CODE" -ne 0 ]; then
227+
MESSAGE='Building dependencies took too long. Restart the build in Travis UI to continue from cache.';
228+
fi
229+
226230
eval '
227231
function '"$cmd"' { return 0; }
228232
function repair_wheelhouse { return 0; }
229-
function install_run {
230-
echo -e "\nBuilding dependencies took too long. Restart the build in Travis UI to continue from cache.\n"
231-
233+
function install_run {'\
234+
"$(if [ -n "$MESSAGE" ]; then
235+
echo \
236+
' echo -e "\n'"$MESSAGE"'\n"'
237+
fi)"\
238+
'
232239
# Travis runs user scripts via `eval` i.e. in the same shell process.
233240
# So have to unset errexit in order to get to cache save stage
234241
set +e; return '"$EXIT_CODE"'

0 commit comments

Comments
 (0)