Download primitives: update was their only caller. */
| 7227 | |
| 7228 | /* Download primitives: update was their only caller. */ |
| 7229 | static int cbm_download_to_file(const char *url, const char *dest) { |
| 7230 | const char *protocol = cli_download_protocol(url); |
| 7231 | if (!protocol || !dest) { |
| 7232 | (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is " |
| 7233 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 7234 | "override)\n"); |
| 7235 | return CLI_TRUE; |
| 7236 | } |
| 7237 | const char *argv[] = {"curl", "-fSL", "--progress-bar", |
| 7238 | "--proto", protocol, "--proto-redir", |
| 7239 | protocol, "-o", dest, |
| 7240 | url, NULL}; |
| 7241 | return cbm_exec_no_shell(argv); |
| 7242 | } |
| 7243 | |
| 7244 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 7245 | const char *protocol = cli_download_protocol(url); |
no test coverage detected