From f7d9016d04dc85090ce700762e3b36a0e6d7e5d9 Mon Sep 17 00:00:00 2001
From: jonny <ga86lad@mytum.de>
Date: Wed, 29 Dec 2021 02:26:59 +0100
Subject: [PATCH] use pipe jq because input read fails in docker print commands

---
 test/run-tests.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/run-tests.sh b/test/run-tests.sh
index abe3b93..504e081 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
 
 
-- 
GitLab