From 6bcbf9e9ebc6fab9649e1586dde39c722c0ba541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Metz?= Date: Thu, 28 Jan 2021 20:31:15 +0100 Subject: [PATCH] Allow for forward any number of arguments and forward the exit code --- entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index abf5ab3..0619b41 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -eo pipefail +set -o pipefail # Resolve to full paths CONFIG_ABS_PATH="$(readlink -f "${INPUT_CONFIG_FILE}")" @@ -10,7 +10,7 @@ WORKING_DIR="$(dirname "${CONFIG_ABS_PATH}")" cd "$WORKING_DIR" ARGS=( - "$1" + "$@" --config "$CONFIG_ABS_PATH" ) @@ -21,6 +21,7 @@ fi IFS= OUTPUT="$(dnscontrol "${ARGS[@]}")" +EXIT_CODE="$?" echo "$OUTPUT" @@ -30,3 +31,4 @@ OUTPUT="${OUTPUT//$'\n'/'%0A'}" OUTPUT="${OUTPUT//$'\r'/'%0D'}" echo "::set-output name=output::$OUTPUT" +exit $EXIT_CODE