diff --git a/test/run-tests.sh b/test/run-tests.sh
index abe3b934118b08def00a7171883edf4631fa2200..504e08190be668f61b4520f12017386d247d85db 100644
--- a/test/run-tests.sh
+++ b/test/run-tests.sh
@@ -3,7 +3,7 @@ TEST_FOLDERS=$(ls -d */)
 
 FAILED=0
 
-set -euo pipefail
+set -euox pipefail
 
 if ! command -v jq &> /dev/null
 then
@@ -16,7 +16,7 @@ do
     dir=${folder%/}
     if [ "$dir" != "test-output" ]; then
         echo "running for $dir"
-        EXPECTED=$(jq . "./${dir}/output.json")
+        EXPECTED=$(cat "./${dir}/output.json" | jq)
         ACTUAL=$(cd .. && stack run -- walint --repository ./test/${dir} --config-file ./config.json --json --pretty | jq && cd test) || true