exercism / v2-configlet

Tool to assist in managing Exercism language tracks.
MIT License
16 stars 23 forks source link

fetch-configlet: spurious error on failure #165

Closed guygastineau closed 5 years ago

guygastineau commented 5 years ago

I have received the following error twice on Travis builds for exercism/bash:

travis_fold:start:before_script �[0Ktravis_time:start:1ae0802b �[0K$ bin/fetch_configlet

gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now travis_timeend1ae0802b:start=1565059734245936845,finish=1565060043499524003,duration=309253587158 �[0K�[31;1mThe command "bin/fetch_configlet" failed and exited with 2

I think this might be due to the piped stdin being closed due to a failure. In which case the error actually will have occurred in the curl command getting piped to tar. If this is the case getting the error from curl would be much less confusing than thinking something is wrong with the downloaded file once it gets to tar.

I think that putting set -o pipefail at the head of the script would solve this problem by throwing a better error if that is the culprit.

Is a PR welcome?

kytrinyx commented 5 years ago

Thanks so much for looking into it, a PR would be very welcome!

guygastineau commented 5 years ago

Great. Coming soon.

guygastineau commented 5 years ago

Oh, I thought I added a clause closing this from the PR.

I'll close it now.