From 3c30640f4b223fbf0d7932bb387d0d0f4d902990 Mon Sep 17 00:00:00 2001 From: Takuo Kitame Date: Wed, 18 Dec 2024 03:41:32 +0900 Subject: [PATCH] fix: additional-args does not accept quoted string (#67) for example, `additional-args: "--merge -d -b '[skip ci]'"` Co-authored-by: marboledacci --- src/scripts/pr-merge.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/pr-merge.sh b/src/scripts/pr-merge.sh index 62ddb57..898d945 100644 --- a/src/scripts/pr-merge.sh +++ b/src/scripts/pr-merge.sh @@ -1,6 +1,6 @@ #!/bin/bash branch="$(eval printf '%s' "$ORB_EVAL_BRANCH")" -additional_args="$(eval printf '%s\\n' "$ORB_EVAL_ADDITIONAL_ARGS")" +readarray -t additional_args < <(eval "set -- $ORB_EVAL_ADDITIONAL_ARGS; printf '%s\n' \"\$@\"") hostname="$(eval printf '%s' "$ORB_EVAL_HOSTNAME")" repo="$(eval printf '%s' "$ORB_EVAL_REPO")" token="${!ORB_ENV_TOKEN}" @@ -21,5 +21,5 @@ set -x # shellcheck disable=SC2086 gh pr merge \ $branch $repo \ - $additional_args + "${additional_args[@]}" set +x