From 19f404799d1692e246695e573bcdcc8757af23f2 Mon Sep 17 00:00:00 2001 From: viq Date: Mon, 24 May 2021 23:41:48 +0200 Subject: [PATCH] test: Fix awk usage for printing refs This should print more fields than just 3rd one if they're present. --- test/test-commit-message.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-commit-message.sh b/test/test-commit-message.sh index 1099f5ff..59a9b402 100755 --- a/test/test-commit-message.sh +++ b/test/test-commit-message.sh @@ -130,7 +130,7 @@ then ref=${GITHUB_BASE_REF} head=${GITHUB_SHA} else - ref=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') + ref=$(echo $GITHUB_REF | cut -d/ -f3-) head="" fi commits=$(git log --no-merges --format=%H origin/${ref}..${head})