From: Daniel Stenberg Date: Tue, 21 Feb 2023 11:09:37 +0000 (+0100) Subject: tool_operate: propagate error codes for missing URL after --next X-Git-Tag: curl-8_0_0~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60e13311f4063bba272ef3aeadb530666304ea56;p=thirdparty%2Fcurl.git tool_operate: propagate error codes for missing URL after --next Fixes #10558 Reported-by: u20221022 on github Closes #10580 --- diff --git a/src/tool_operate.c b/src/tool_operate.c index cec24057a6..ba089b3bf6 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2472,8 +2472,10 @@ static CURLcode serial_transfers(struct GlobalConfig *global, else { /* setup the next one just before we delete this */ result = create_transfer(global, share, &added); - if(result) + if(result) { + returncode = result; bailout = TRUE; + } } per = del_per_transfer(per); @@ -2515,7 +2517,8 @@ static CURLcode transfer_per_config(struct GlobalConfig *global, /* Check we have a url */ if(!config->url_list || !config->url_list->url) { - helpf(global->errors, "no URL specified!\n"); + helpf(global->errors, "(%d) no URL specified!\n", + CURLE_FAILED_INIT); return CURLE_FAILED_INIT; }