summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-05 06:27:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-05 06:27:12 (GMT)
commit7d181222ea568ada9952f23a8f92b35bce161cc2 (patch)
tree014fcf13b241769b956a924dcd050a6399aeb589
parent6914c661c3652e22fc2971bfefd36fddad56233a (diff)
parente6e592db4c0099a6412aed6e868769535900f112 (diff)
downloadgit-7d181222ea568ada9952f23a8f92b35bce161cc2.zip
git-7d181222ea568ada9952f23a8f92b35bce161cc2.tar.gz
git-7d181222ea568ada9952f23a8f92b35bce161cc2.tar.bz2
Merge branch 'jn/gitweb-config-error-die' into maint
* jn/gitweb-config-error-die: gitweb: Die if there are parsing errors in config file
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0b1e357..3d80deb 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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.