Skip to content

Commit

Permalink
Only add argument to options array if it is not empty
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry committed Jan 24, 2024
1 parent a3f5b56 commit 4fcff51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion update-make-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ runs:
# For example, pr_options: --label 'backport v10.0.x'
OPTIONS_ARRAY=()
while IFS= read -r -d '' arg; do
OPTIONS_ARRAY+=("$(printf "%q" "$arg")")
if [[ -n "${arg}" ]]; then
OPTIONS_ARRAY+=("$(printf '%q' "${arg}")")
fi
done < <(echo "${PR_OPTIONS}" | xargs printf '%s\0')
if ! git diff --exit-code; then
Expand Down

0 comments on commit 4fcff51

Please sign in to comment.