Download primitives: update was their only caller. */
| 7063 | |
| 7064 | /* Download primitives: update was their only caller. */ |
| 7065 | static int cbm_download_to_file(const char *url, const char *dest) { |
| 7066 | const char *protocol = cli_download_protocol(url); |
| 7067 | if (!protocol || !dest) { |
| 7068 | (void)fprintf(stderr, "error: update downloads require HTTPS (file:// is " |
| 7069 | "reserved for an explicit CBM_DOWNLOAD_URL test " |
| 7070 | "override)\n"); |
| 7071 | return CLI_TRUE; |
| 7072 | } |
| 7073 | const char *argv[] = {"curl", "-fSL", "--progress-bar", |
| 7074 | "--proto", protocol, "--proto-redir", |
| 7075 | protocol, "-o", dest, |
| 7076 | url, NULL}; |
| 7077 | return cbm_exec_no_shell(argv); |
| 7078 | } |
| 7079 | |
| 7080 | static int cbm_download_to_file_quiet(const char *url, const char *dest) { |
| 7081 | const char *protocol = cli_download_protocol(url); |
no test coverage detected