| 7242 | } |
| 7243 | |
| 7244 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 7245 | const char *protocol = cli_download_protocol(url); |
| 7246 | if (!protocol || !dest) { |
| 7247 | (void)fprintf(stderr, "error: checksum downloads require HTTPS (file:// is " |
| 7248 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 7249 | "override)\n"); |
| 7250 | return CLI_TRUE; |
| 7251 | } |
| 7252 | const char *argv[] = {"curl", "-fsSL", "--proto", protocol, "--proto-redir", |
| 7253 | protocol, "-o", dest, url, NULL}; |
| 7254 | return cbm_exec_no_shell(argv); |
| 7255 | } |
| 7256 | |
| 7257 | #endif /* CBM_CLI_ENABLE_TEST_API */ |
| 7258 |
no test coverage detected