From d01e467070f31beffedc68c13fd3931e04f3b987 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 29 May 2020 13:31:24 +0200 Subject: [PATCH] .github/scripts/replace-asset.sh: fixed a fail Fixed premature end when GITHUB_REPOSITORY/GITHUB_TOKEN were not given. --- .github/scripts/replace-asset.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/replace-asset.sh b/.github/scripts/replace-asset.sh index 720ee2fe3..c86f828bb 100755 --- a/.github/scripts/replace-asset.sh +++ b/.github/scripts/replace-asset.sh @@ -1,6 +1,7 @@ #!/bin/sh -eux -# If first parameter is GITHUB_TOKEN=, use as an env var GITHUB_TOKEN (used by the scripts below) +set +e # pattern matching may fail +# If first parameter 2 parameters is GITHUB_REPOSOTIRY and GITHUB_TOKEN, those willbe used as an env var (used by the scripts below) REPOSITORY=$(expr $1 : "GITHUB_REPOSITORY=\(.*\)") if [ $? -eq 0 ]; then export GITHUB_REPOSITORY=$REPOSITORY @@ -11,6 +12,7 @@ if [ $? -eq 0 ]; then export GITHUB_TOKEN=$TOKEN shift fi +set -e DIR=$(dirname $0)