diff options
| -rw-r--r-- | src/lib/core/artifactory.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/core/artifactory.c b/src/lib/core/artifactory.c index eedaf43..d5457e7 100644 --- a/src/lib/core/artifactory.c +++ b/src/lib/core/artifactory.c @@ -61,9 +61,10 @@ int artifactory_download_cli(char *dest, } sprintf(path + strlen(path), "/%s", remote_filename); - long fetch_status = download(url, path, NULL); - if (HTTP_ERROR(fetch_status) || fetch_status < 0) { - fprintf(stderr, "%s: download failed: %s\n", __FUNCTION__, url); + char *errmsg = NULL; + long fetch_status = download(url, path, &errmsg); + if (HTTP_ERROR(fetch_status)) { + SYSERROR("download failed: %s: %s\n", errmsg, url); return -1; } chmod(path, 0755); |
