aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github.cxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-02-26 18:00:30 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-06-05 09:12:46 +0200
commit6c1821bc4970f6bc68f11a44956460032a52fc5d (patch)
treedf5b4e1cd9eb932e0c8e53e9985ce056d50f0653 /mod/mod-ci-github.cxx
parentead4128a1b5915b32dda5d9eef56732de9d5aadd (diff)
Pass no_fail curl flag
Diffstat (limited to 'mod/mod-ci-github.cxx')
-rw-r--r--mod/mod-ci-github.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index 7ca9ff3..fbe2fec 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -218,12 +218,9 @@ namespace brep
// Pass --include to print the HTTP status line (followed by the response
// headers) so that we can get the response status code.
//
- // Pass --no-fail to disable the --fail option added by butl::curl which
- // causes curl to exit with status 22 in case of an error HTTP response
- // status code (>= 400) otherwise we can't get the status code.
- //
- // @@ KAREN: fix butl::curl (detect if --no-fail or --fail is passed
- // explicitly).
+ // Suppress the --fail option which causes curl to exit with status 22
+ // in case of an error HTTP response status code (>= 400) otherwise we
+ // can't get the status code.
//
// Note that butl::curl also adds --location to make curl follow redirects
// (which is recommended by GitHub).
@@ -237,9 +234,10 @@ namespace brep
curl c (path ("-"),
path ("-"), // Write response to curl::in.
process::pipe (errp.in.get (), move (errp.out)),
- curl::post, "https://api.github.com/" + ep,
+ curl::post,
+ curl::flags::no_fail,
+ "https://api.github.com/" + ep,
"--include", // Output response headers for status code.
- "--no-fail", // Don't exit with 22 if response status code >= 400.
"--header", "Accept: application/vnd.github+json",
"--header", "X-GitHub-Api-Version: 2022-11-28",
move (hdr_opts));