From 60af48d02beae6826d40418c67e05ac029462304 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 5 Apr 2023 23:18:02 +0200 Subject: [PATCH] install dependencies before anything else --- forgejo-test-helper.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/forgejo-test-helper.sh b/forgejo-test-helper.sh index ebc53c9..a0bdc29 100755 --- a/forgejo-test-helper.sh +++ b/forgejo-test-helper.sh @@ -49,10 +49,6 @@ function api() { shift token=$1 - if ! which jq curl > /dev/null ; then - apt-get -qq install -y jq curl - fi - curl --fail -X $method -sS -H "Content-Type: application/json" -H "Authorization: token $token" "$@" $url/api/v1/$path } @@ -159,4 +155,12 @@ function push_self_action() { ) } +function dependencies() { + if ! which jq curl > /dev/null ; then + apt-get -qq install -y jq curl + fi +} + +dependencies + "$@"