Fix for #41 (bad GB run causing malformed json)

This commit is contained in:
Mason Rowe 2022-11-22 23:58:01 -05:00 committed by GitHub
parent 4aad8ab896
commit b3a7dcb142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -882,7 +882,8 @@ if [ -z "$SKIP_GEEKBENCH" ]; then
if [[ $GEEKBENCH_5 == *True* ]]; then
launch_geekbench 5
fi
[[ ! -z $JSON ]] && JSON_RESULT=${JSON_RESULT::${#JSON_RESULT}-1} && JSON_RESULT+=']'
[[ ! -z $JSON ]] && [[ $(echo -n $JSON_RESULT | tail -c 1) == ',' ]] && JSON_RESULT=${JSON_RESULT::${#JSON_RESULT}-1}
[[ ! -z $JSON ]] && JSON_RESULT+=']'
fi
# finished all tests, clean up all YABS files and exit