Skip to content

Commit bf7912c

Browse files
committed
Simplify curl auth_header array expansion in find-pr-info.sh
1 parent 97c5879 commit bf7912c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/find-pr-info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [ -n "${GITHUB_TOKEN:-}" ]; then
6565
auth_header=(-H "Authorization: Bearer ${GITHUB_TOKEN}")
6666
fi
6767

68-
if ! pr_json="$(curl -fsSL ${auth_header[@]+"${auth_header[@]}"} "https://api.github.com/repos/${repo}/pulls/${pr_number}")"; then
68+
if ! pr_json="$(curl -fsSL "${auth_header[@]}" "https://api.github.com/repos/${repo}/pulls/${pr_number}")"; then
6969
curl_rc=$?
7070
echo "error: curl failed ($curl_rc) fetching PR #${pr_number} from ${repo}" >&2
7171
exit 1

0 commit comments

Comments
 (0)