MINOR: init: make -cc support environment variables expansion

I found myself a few times testing some conditoin examples from the doc
against command line's "-cc" to see that they didn't work with environment
variables expansion. Not being documented as being on purpose it looks like
a miss, so let's add PARSE_OPT_ENV and PARSE_OPT_WORD_EXPAND to be able to
test for example -cc "streq(${WITH_SSL},yes)" to help debug expressions.
This commit is contained in:
Willy Tarreau 2021-07-16 19:14:54 +02:00
parent 7edc0fde05
commit a87e782a2d

View File

@ -1808,7 +1808,7 @@ static void init(int argc, char **argv)
size_t outlen = strlen(check_condition) + 1;
err = parse_line(check_condition, check_condition, &outlen, args, &arg,
PARSE_OPT_DQUOTE | PARSE_OPT_SQUOTE | PARSE_OPT_BKSLASH,
PARSE_OPT_ENV | PARSE_OPT_WORD_EXPAND | PARSE_OPT_DQUOTE | PARSE_OPT_SQUOTE | PARSE_OPT_BKSLASH,
&errptr);
if (err & PARSE_ERR_QUOTE) {