1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-03 09:56:15 +02:00

Merge branch 'jn/gitweb-config-error-die'

* jn/gitweb-config-error-die:
  gitweb: Die if there are parsing errors in config file
This commit is contained in:
Junio C Hamano 2010-03-02 12:44:11 -08:00
commit ca97d26cc6

View File

@ -550,11 +550,14 @@ sub filter_snapshot_fmts {
}
our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
# die if there are errors parsing config file
if (-e $GITWEB_CONFIG) {
do $GITWEB_CONFIG;
} else {
our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || "++GITWEB_CONFIG_SYSTEM++";
do $GITWEB_CONFIG_SYSTEM if -e $GITWEB_CONFIG_SYSTEM;
die $@ if $@;
} elsif (-e $GITWEB_CONFIG_SYSTEM) {
do $GITWEB_CONFIG_SYSTEM;
die $@ if $@;
}
# Get loadavg of system, to compare against $maxload.