Skip to content

Commit

Permalink
wip: 🔕 temporary commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam committed Nov 20, 2024
1 parent 1690b26 commit 3c8f52a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions patches/fail-exit-code.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
diff --git a/src/tool_operate.c b/src/tool_operate.c
index e6ca575..4f3e65f 100644
index a1212c9..16334d3 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -622,6 +622,11 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
free(per->outfile);
free(per->uploadfile);

@@ -772,6 +772,12 @@ skip:
free(per->errorbuffer);
curl_slist_free_all(per->hdrcbdata.headlist);
per->hdrcbdata.headlist = NULL;
+
+ /* return exit code 1 when flag --fail is used */
+ if (config->failonerror && (CURLE_HTTP_RETURNED_ERROR == result)) {
+ result = CURLE_UNSUPPORTED_PROTOCOL;
+ }
+
return result;
}

0 comments on commit 3c8f52a

Please # to comment.