Skip to content

Commit

Permalink
Use environment variables for config path
Browse files Browse the repository at this point in the history
  • Loading branch information
seretol committed Mar 17, 2020
1 parent dc0b5d4 commit cd225e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Pathogens/ConfigSettings.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ has 'settings' => ( is => 'rw', isa => 'HashRef', lazy_build => 1 );
sub _build_settings
{
my $self = shift;
my %config_settings = %{ Load( scalar read_file("config/".$self->environment."/".$self->filename.""))};
my $directory = (defined $ENV{'UPDATE_PIPELINE_CONFIG_PATH'}) ? $ENV{'UPDATE_PIPELINE_CONFIG_PATH'} : "config/" . $self->environment ;

my %config_settings = %{ Load( scalar read_file($directory . "/" . $self->filename.""))};
return \%config_settings;
}

Expand Down

0 comments on commit cd225e8

Please sign in to comment.