From 016d9a4d129f6f305f57e9a4cdcb76f7c0f68df1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 4 Feb 2023 18:36:09 -0800 Subject: [PATCH] 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. --- .builds/readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.builds/readme.yml b/.builds/readme.yml index 9ff788f..609f2b8 100644 --- a/.builds/readme.yml +++ b/.builds/readme.yml @@ -22,6 +22,6 @@ tasks: "readme": . } }' < $readme \ - | curl --oauth2-bearer <(~/.vc-p4-auth) \ + | curl --fail-with-body --oauth2-bearer <(~/.vc-p4-auth) \ -H "Content-Type: application/json" \ -d@- https://git.sr.ht/query