Skip to content

Commit

Permalink
Merge branch 'jn/gitweb-config-error-die' into maint
Browse files Browse the repository at this point in the history
* jn/gitweb-config-error-die:
  gitweb: Die if there are parsing errors in config file
  • Loading branch information
Junio C Hamano committed Mar 5, 2010
2 parents 6914c66 + e6e592d commit 7d18122
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,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.
Expand Down

0 comments on commit 7d18122

Please sign in to comment.