Skip to content

Commit a8daa19

Browse files
If the job ID does not look like a UUID, print the Curl output to the log (#40)
* If the job ID does not look like a UUID, print the Curl output to the log * Tell Curl to be verbose Co-authored-by: Elliot Saba <[email protected]> --------- Co-authored-by: Elliot Saba <[email protected]>
1 parent 4ba966f commit a8daa19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hooks/environment.agent

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ function get_initial_job_id() {
134134
echo "ERROR: Initial job ID output invalid:\n${CURL_OUTPUT}" >&2
135135
echo "Retrying up to $((3 - $idx)) more times before failing out..." >&2
136136
done
137+
# If we fail out, let's print the curl output to the log:
138+
echo "Begin curl output:"
139+
curl --fail-with-body -vL -H "${TOKEN_HEADER}" "${URL}"
140+
echo "End curl output"
137141
die "Initial job ID does not look like a UUID: '${CURL_UUID}'"
138142
}
139143

0 commit comments

Comments
 (0)