travis: Don't pipe negative lgtm.com result into jq
The data might not be valid JSON.
This commit is contained in:
parent
364d8b2628
commit
4b225bf866
|
@ -330,8 +330,8 @@ lgtm)
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $?
|
-H "Authorization: Bearer ${LGTM_TOKEN}" > lgtm.res || exit $?
|
||||||
lgtm_check_url=$(jq -r '."task-result-url"' lgtm.res)
|
lgtm_check_url=$(jq -r '."task-result-url"' lgtm.res)
|
||||||
if [ "$lgtm_check_url" = "null" ]; then
|
if [ -z "$lgtm_check_url" -o "$lgtm_check_url" = "null" ]; then
|
||||||
cat lgtm.res | jq
|
cat lgtm.res
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
lgtm_url=$(jq -r '."task-result"."results-url"' lgtm.res)
|
lgtm_url=$(jq -r '."task-result"."results-url"' lgtm.res)
|
||||||
|
|
Loading…
Reference in New Issue