Commit 27329aac authored by Sergei Golubchik's avatar Sergei Golubchik

mtr: no warning when an environment variable isn't set

e.g. "No option named 'FILE_KEY_MANAGEMENT_SO' in group 'ENV' at lib/My/ConfigFactory.pm line 370."
when a test has `plugin-load-add=@ENV.FILE_KEY_MANAGEMENT_SO`
parent a265f0ff
......@@ -195,14 +195,10 @@ sub value {
my ($self, $option_name)= @_;
my $option= $self->option($option_name);
if (! defined($option) and defined $ENV{$option_name}) {
if (! defined($option)) {
my $value= $ENV{$option_name};
$option= My::Config::Option->new($option_name, $value);
}
croak "No option named '$option_name' in group '$self->{name}'"
if ! defined($option);
return $option->value();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment