Apply requested changes to Config.pm

This commit is contained in:
Shay Bergmann
2021-07-26 17:11:21 +00:00
parent 4f95774ca3
commit 173ecb5d92
3 changed files with 4 additions and 11 deletions

View File

@ -42,14 +42,14 @@ my $hydraConfig;
sub getHydraConfig {
return $hydraConfig if defined $hydraConfig;
my $conf = $ENV{"HYDRA_CONFIG"} || (Hydra::Model::DB::getHydraPath . "/hydra.conf");
my %opts = (%Hydra::Config::configGeneralOpts, -ConfigFile => $conf);
if (-f $conf) {
# Please keep these options in sync with corresponding
# `Catalyst::Plugin::ConfigLoader` configuration in `Hydra.pm`
# This is necessary in order to maintain consistent interpretation
# of the config by the various hydra components.
my %h = new Config::General( -ConfigFile => $conf
, %configGeneralOpts )->getall;
my %h = new Config::General(%opts)->getall;
$hydraConfig = \%h;
} else {