From 6c1821bc4970f6bc68f11a44956460032a52fc5d Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Mon, 26 Feb 2024 18:00:30 +0200 Subject: Pass no_fail curl flag --- mod/mod-ci-github.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mod') 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)); -- cgit v1.1