From 33692c33f2effa9620064aec44c6196a8d830d05 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 25 Sep 2016 15:56:43 +0200 Subject: [PATCH 1/1] test-lib: Fix a bash-4.4 issue. Apparently bash-4.4 changed how unquoted here strings are treated. We want to process only the first line of the output, so the right thing to do is to ask awk to exit after processing the first line. This works regardless of the bash version. --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 99e575d3..1f9913e3 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -156,7 +156,7 @@ test_require_executables() test_duration() { local t=$(exec 2>&1 1>/dev/null; time -p "$@") - result=$(awk '{print $2 * 1000}' <<< $t) + result=$(awk '{print $2 * 1000; exit 0}' <<< "$t") } test_expect_success() -- 2.30.2