Ignore (with warning) unknown vars in --options
This commit is contained in:
parent
1f31b0e570
commit
89c84f9f07
1 changed files with 5 additions and 0 deletions
|
@ -2002,6 +2002,11 @@ sub init_config {
|
||||||
# TODO: This might grab an arbitrary protocol-specific variable, which could cause
|
# TODO: This might grab an arbitrary protocol-specific variable, which could cause
|
||||||
# surprising behavior.
|
# surprising behavior.
|
||||||
my $def = $variables{'merged'}{$k};
|
my $def = $variables{'merged'}{$k};
|
||||||
|
if (!$def) {
|
||||||
|
warning("ignoring unknown setting '$k=$globals{$k}'");
|
||||||
|
delete($globals{$k});
|
||||||
|
next;
|
||||||
|
}
|
||||||
# TODO: Isn't $globals{$k} guaranteed to be defined here? Otherwise $k wouldn't appear in
|
# TODO: Isn't $globals{$k} guaranteed to be defined here? Otherwise $k wouldn't appear in
|
||||||
# %globals.
|
# %globals.
|
||||||
my $ovalue = $globals{$k} // $def->{'default'};
|
my $ovalue = $globals{$k} // $def->{'default'};
|
||||||
|
|
Loading…
Reference in a new issue