diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-02-26 18:00:30 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-10-15 09:05:27 +0200 |
commit | f50c39d83c81cf3d5122e711677309c83904c5c7 (patch) | |
tree | 8c4263056e6191be0b9f7114616d8a7fc5274e5d | |
parent | d9235aee74d18c93e35c33c750676e072de0af59 (diff) |
Pass no_fail curl flag
-rw-r--r-- | mod/mod-ci-github.cxx | 14 |
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)); |