fix code to detect failing pipes, fix #1741
NEXT: 1.19.1 with 1741
Merge branch 'master' of github.com:wayneeseguin/rvm