Download primitives: update was their only caller. */
| 7899 | |
| 7900 | /* Download primitives: update was their only caller. */ |
| 7901 | static int cbm_download_to_file(const char *url, const char *dest) { |
| 7902 | const char *protocol = cli_download_protocol(url); |
| 7903 | if (!protocol || !dest) { |
| 7904 | (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is " |
| 7905 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 7906 | "override)\n"); |
| 7907 | return CLI_TRUE; |
| 7908 | } |
| 7909 | const char *argv[] = {"curl", "-fSL", "--progress-bar", |
| 7910 | "--proto", protocol, "--proto-redir", |
| 7911 | protocol, "-o", dest, |
| 7912 | url, NULL}; |
| 7913 | return cbm_exec_no_shell(argv); |
| 7914 | } |
| 7915 | |
| 7916 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 7917 | const char *protocol = cli_download_protocol(url); |
no test coverage detected