We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ae9b36 commit 5118b1fCopy full SHA for 5118b1f
1 file changed
scripts/publish.sh
@@ -87,12 +87,12 @@ trap 'rm -f "$body_file"' EXIT
87
# curl -sS (no --fail) returns 0 for any HTTP response, non-zero only on
88
# network/protocol errors — so we can cleanly separate "server answered" from
89
# "could not reach server".
90
-curl_auth_args=()
+auth_header=""
91
if [[ -n "${NODE_AUTH_TOKEN:-}" ]]; then
92
- curl_auth_args=(-H "Authorization: Bearer ${NODE_AUTH_TOKEN}")
+ auth_header="Authorization: Bearer ${NODE_AUTH_TOKEN}"
93
fi
94
if ! http_code=$(curl -sS -m 30 -o "$body_file" -w '%{http_code}' \
95
- "${curl_auth_args[@]}" "$packument_url"); then
+ ${auth_header:+-H "$auth_header"} "$packument_url"); then
96
echo "ERROR: request to ${packument_url} failed (network/timeout); refusing to publish on an ambiguous result." >&2
97
exit 1
98
0 commit comments