| 6991 | } |
| 6992 | |
| 6993 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 6994 | const char *protocol = cli_download_protocol(url); |
| 6995 | if (!protocol || !dest) { |
| 6996 | (void)fprintf(stderr, "error: checksum downloads require HTTPS (file:// is " |
| 6997 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 6998 | "override)\n"); |
| 6999 | return CLI_TRUE; |
| 7000 | } |
| 7001 | const char *argv[] = {"curl", "-fsSL", "--proto", protocol, "--proto-redir", |
| 7002 | protocol, "-o", dest, url, NULL}; |
| 7003 | return cbm_exec_no_shell(argv); |
| 7004 | } |
| 7005 | |
| 7006 | #endif /* CBM_CLI_ENABLE_TEST_API */ |
| 7007 |
no test coverage detected