diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-09-05 13:09:01 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-09-22 00:22:09 +0200 |
commit | 27329aac33e6fd6d7a25d787d2e961c7095bc5bf (patch) | |
tree | 6cbcce5a2f4a8780f4d7f59417fd94481d40089e | |
parent | a265f0ff247a5ea1ab052a87c53be2d7ccf51300 (diff) | |
download | mariadb-git-27329aac33e6fd6d7a25d787d2e961c7095bc5bf.tar.gz |
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`
-rw-r--r-- | mysql-test/lib/My/Config.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm index 1d8d1617fce..d6924a3c866 100644 --- a/mysql-test/lib/My/Config.pm +++ b/mysql-test/lib/My/Config.pm @@ -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(); } |