Treat SIGPIPE (exit code 141) as a success

If SIGPIPE is received, it doesn't mean that we didn't manage to extract
the version; this change should fix this issue.

This should resolve #18.
This commit is contained in:
vimist 2017-10-14 08:53:50 +01:00
parent dc072fd7d6
commit 1382244c94
1 changed files with 1 additions and 1 deletions

2
has
View File

@ -125,7 +125,7 @@ __detect(){
echo ${FAIL} ${command}
KO=$(($KO+1))
elif [ ${status} -eq 0 ]; then ## successfully executed
elif [ ${status} -eq 0 ] || [ ${status} -eq 141 ]; then ## successfully executed
echo ${PASS} ${command} ${version}
OK=$(($OK+1))