Add --fail-with-body to curl command

When the command gets an error response it still returns 0 if there is output.
With this flag it'll still return a non-zero status code even when it outputs
text, assuming that the server responds with something of 400 or higher.
This commit is contained in:
Tom Willemse 2023-02-04 18:36:09 -08:00
parent a54a081042
commit 016d9a4d12

View file

@ -22,6 +22,6 @@ tasks:
"readme": . "readme": .
} }
}' < $readme \ }' < $readme \
| curl --oauth2-bearer <(~/.vc-p4-auth) \ | curl --fail-with-body --oauth2-bearer <(~/.vc-p4-auth) \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d@- https://git.sr.ht/query -d@- https://git.sr.ht/query