Disable fail-on-errors during RVM source 04/78804/1
authorDaniel Farrell <dfarrell@redhat.com>
Fri, 14 Dec 2018 17:29:50 +0000 (12:29 -0500)
committerDaniel Farrell <dfarrell@redhat.com>
Fri, 14 Dec 2018 18:00:41 +0000 (13:00 -0500)
Recent changes to RVM have introduced a non-zero exit in the source
command that makes functions available. This causes our jobs to fail,
since we run with fail-on-errors. Turn off fail-on-errors during that
step and enable right after.

Change-Id: Idd5f550639c714219d51395113f2089bc07682a2
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
jjb/packaging/test-puppet.sh

index 39b753a87dea6045b5ac694e3ea66ca066b07815..d460e451edbce671d298fd26fe2c6bbcefb16b70 100644 (file)
@@ -22,8 +22,12 @@ curl -L get.rvm.io | bash -s stable
 # Expected by RVM, seems required to make RVM functions (`rvm use`) available
 # Silence absurdly verbose rvm output by temporally not echoing commands
 set +x
+# Source line has a non-zero exit somewhere, that RVM doesn't mean to indicate
+# a real failure, but causes our jobs to fail when fail-on-errors is enabled.
+set +e
 # shellcheck disable=SC1090
 source "$HOME/.rvm/scripts/rvm"
+set -e
 rvm install 2.4.0
 set -x
 ruby --version