mirror of
https://github.com/koenrh/dnscontrol-action.git
synced 2025-02-24 23:13:24 +08:00
Don't set '--creds' flag for 'check' sub-command
This commit is contained in:
parent
34dfb69847
commit
3ab26ada34
1 changed files with 11 additions and 1 deletions
|
@ -9,8 +9,18 @@ CREDS_ABS_PATH="$(readlink -f "${INPUT_CREDS_FILE}")"
|
|||
WORKING_DIR="$(dirname "${CONFIG_ABS_PATH}")"
|
||||
cd "$WORKING_DIR"
|
||||
|
||||
ARGS=(
|
||||
"$1"
|
||||
--config "$CONFIG_ABS_PATH"
|
||||
)
|
||||
|
||||
# 'check' sub-command doesn't require credentials
|
||||
if [ "$1" != "check" ]; then
|
||||
ARGS+=(--creds "$CREDS_ABS_PATH")
|
||||
fi
|
||||
|
||||
IFS=
|
||||
OUTPUT="$(dnscontrol "$1" --config "$CONFIG_ABS_PATH" --creds "$CREDS_ABS_PATH")"
|
||||
OUTPUT="$(dnscontrol "${ARGS[@]}")"
|
||||
|
||||
echo "$OUTPUT"
|
||||
|
||||
|
|
Loading…
Reference in a new issue