BUG/MINOR: acme/cli: don't output error on success

Previous patch 7251c13c7 ("MINOR: acme: move the acme task init in a dedicated
function") mistakenly returned the wrong error code when "acme renew" parsing
was successful, and tried to emit an error message.

This patch fixes the issue by returning 0 when the acme task was correctly
scheduled to start.

No backport needed.
This commit is contained in:
William Lallemand 2025-05-02 21:15:45 +02:00
parent 0e6f968ee3
commit af5bbce664

View File

@ -2286,8 +2286,11 @@ static int cli_acme_renew_parse(char **args, char *payload, struct appctx *appct
goto err;
}
acme_start_task(store, &errmsg);
if (acme_start_task(store, &errmsg) != 0)
goto err;
HA_SPIN_UNLOCK(CKCH_LOCK, &ckch_lock);
return 0;
err:
HA_SPIN_UNLOCK(CKCH_LOCK, &ckch_lock);
return cli_dynerr(appctx, errmsg);