X Tutup
Skip to content

Commit 5ac048c

Browse files
author
PatR
committed
'bad negation' during config file processing
This fixes the problem with reporting "the <foo> option may not both have a value and be negated" to stdout if delivered before the interface has been set up, so possibly not be seen. It has been using pline_The() but that uses rawprint() during startup. Unfortunately testing it has uncovered another config file error reporting issue and this one won't be so easy to fix. For a logical line that uses backslash+newline continuations to span multiple physical lines, when there is a problem it reports the line number and text of the last segment rather than of the first or of the specific segment containing the problem. That isn't necessarily wrong but is suboptimal.
1 parent dd36d76 commit 5ac048c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5812,8 +5812,8 @@ string_for_env_opt(const char *optname, char *opts, boolean val_optional)
58125812
static void
58135813
bad_negation(const char *optname, boolean with_parameter)
58145814
{
5815-
pline_The("%s option may not %sbe negated.", optname,
5816-
with_parameter ? "both have a value and " : "");
5815+
config_error_add("The %s option may not %sbe negated.", optname,
5816+
with_parameter ? "both have a value and " : "");
58175817
}
58185818

58195819
/* go through all of the options and set the minmatch value

0 commit comments

Comments
 (0)
X Tutup