commands/exec_always: defer command on config validation

The exec_always command was executed twice, since it was not checking for the
config->validating variable.
Fix this by defering the command if the configuration is validating.

Fixes #3072
This commit is contained in:
Rouven Czerwinski 2018-11-05 20:28:59 +01:00
parent e9c77970fa
commit 5fdffea99a
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@
struct cmd_results *cmd_exec_always(int argc, char **argv) {
struct cmd_results *error = NULL;
if (!config->active) return cmd_results_new(CMD_DEFER, NULL, NULL);
if (!config->active || config->validating) return cmd_results_new(CMD_DEFER, NULL, NULL);
if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) {
return error;
}