aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_operate.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index fc54819ea..6e0715707 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -234,11 +234,6 @@ static int operate_do(struct Configurable *config)
** from outside of nested loops further down below.
*/
- /* Get the required aguments */
- res = get_args(config);
- if(res)
- goto quit_curl;
-
/* Check we have a url */
if(!config->url_list || !config->url_list->url) {
helpf(config->errors, "no URL specified!\n");
@@ -1845,6 +1840,17 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
else {
struct Configurable *operation = config;
+ /* Get the required aguments for each operation */
+ while(!result && operation) {
+ result = get_args(operation);
+
+ operation = operation->next;
+ }
+
+ /* Reset the operation pointer */
+ operation = config;
+
+ /* Perform each operation */
while(!result && operation) {
result = operate_do(operation);