diff --git a/update-make-docs/action.yml b/update-make-docs/action.yml index 7e5290ce9..13e833af0 100644 --- a/update-make-docs/action.yml +++ b/update-make-docs/action.yml @@ -81,7 +81,7 @@ runs: # For example, pr_options: --label 'backport v10.0.x' OPTIONS_ARRAY=() while IFS= read -r -d '' arg; do - OPTIONS_ARRAY+=("$arg") + OPTIONS_ARRAY+=("$(printf "%q" "$arg")") done < <(echo "${PR_OPTIONS}" | xargs printf '%s\0') if ! git diff --exit-code; then @@ -89,6 +89,6 @@ runs: git push origin "refs/heads/${BRANCH}" # Set default options before the user-provided ones as later options appear to override earlier ones. # For example, in `gh pr create --web --title foo --title bar`, the resulting title is "bar". - gh pr create --title 'Update `make docs` procedure' --body '' ${OPTIONS_ARRAY[@]} + gh pr create --title 'Update `make docs` procedure' --body '' "${OPTIONS_ARRAY[@]}" fi shell: bash