summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-02 12:44:11 -0800
committerJunio C Hamano <gitster@pobox.com>2010-03-02 12:44:11 -0800
commitca97d26cc612348baa423475adfb48194386b4a5 (patch)
treeab80679798c1f45b52c8614d087b3e6170937868 /gitweb
parente4b89317cde316f8e9095eb0399f5f550ffe8230 (diff)
parente6e592db4c0099a6412aed6e868769535900f112 (diff)
downloadgit-ca97d26cc612348baa423475adfb48194386b4a5.tar.gz
Merge branch 'jn/gitweb-config-error-die'
* jn/gitweb-config-error-die: gitweb: Die if there are parsing errors in config file
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3c879b88fe..32b04a469e 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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.