| 7914 | } |
| 7915 | |
| 7916 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 7917 | const char *protocol = cli_download_protocol(url); |
| 7918 | if (!protocol || !dest) { |
| 7919 | (void)fprintf(stderr, "error: checksum downloads require HTTPS (file:// is " |
| 7920 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 7921 | "override)\n"); |
| 7922 | return CLI_TRUE; |
| 7923 | } |
| 7924 | const char *argv[] = {"curl", "-fsSL", "--proto", protocol, "--proto-redir", |
| 7925 | protocol, "-o", dest, url, NULL}; |
| 7926 | return cbm_exec_no_shell(argv); |
| 7927 | } |
| 7928 | |
| 7929 | #endif /* CBM_CLI_ENABLE_TEST_API */ |
| 7930 |
no test coverage detected