Download primitives: update was their only caller. */
| 8105 | |
| 8106 | /* Download primitives: update was their only caller. */ |
| 8107 | static int cbm_download_to_file(const char *url, const char *dest) { |
| 8108 | const char *protocol = cli_download_protocol(url); |
| 8109 | if (!protocol || !dest) { |
| 8110 | (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is " |
| 8111 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 8112 | "override)\n"); |
| 8113 | return CLI_TRUE; |
| 8114 | } |
| 8115 | const char *argv[] = {"curl", "-fSL", "--progress-bar", |
| 8116 | "--proto", protocol, "--proto-redir", |
| 8117 | protocol, "-o", dest, |
| 8118 | url, NULL}; |
| 8119 | return cbm_exec_no_shell(argv); |
| 8120 | } |
| 8121 | |
| 8122 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 8123 | const char *protocol = cli_download_protocol(url); |
no test coverage detected