From 44ad46d6e6b98c445ee8f0007b487a04cc3c4ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=81=A3?= <⁣> Date: Sat, 20 Jun 2020 12:36:27 +0200 Subject: [PATCH] Fix bug --- go/tests/entrypoint.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/go/tests/entrypoint.sh b/go/tests/entrypoint.sh index 3a1ed757..863b93d7 100755 --- a/go/tests/entrypoint.sh +++ b/go/tests/entrypoint.sh @@ -27,13 +27,14 @@ if test "$s"; then fi # Check restrictions -if test "$ALLOWED_FUNCTIONS"; then - for file in $EXPECTED_FILES; do - # shellcheck disable=SC2086 - rc "$file" $ALLOWED_FUNCTIONS - done +if test "$ALLOWED_FUNCTIONS" && test "$EXPECTED_FILES"; then + IFS=' ' + first_file=$(echo "$EXPECTED_FILES" | cut -d' ' -f1) + # shellcheck disable=SC2086 + rc "$first_file" $ALLOWED_FUNCTIONS fi - +IFS=' +' # Compile and run test cd GOPATH=$HOME:$GOPATH