]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 97290: checksetup.pl should report about errors in localconfig
authorzach%zachlipton.com <>
Thu, 14 Feb 2002 12:27:50 +0000 (12:27 +0000)
committerzach%zachlipton.com <>
Thu, 14 Feb 2002 12:27:50 +0000 (12:27 +0000)
r=kiko x2

checksetup.pl

index 97b5d471f2a50e8b54d1897edd293aff2cf28070..bce70d29517a5c3bd51be918c2f5804239b9c795 100755 (executable)
@@ -22,6 +22,7 @@
 #                 Terry Weissman <terry@mozilla.org>
 #                 Dan Mosedale <dmose@mozilla.org>
 #                 Dave Miller <justdave@syndicomm.com>
+#                 Zach Lipton  <zach@zachlipton.com>
 #
 #
 # Direct any questions on this source code to
@@ -265,6 +266,24 @@ if (@missing > 0) {
 
 print "Checking user setup ...\n";
 do 'localconfig';
+if ($@ ne "") { # capture errors in localconfig, bug 97290
+   print STDERR <<EOT;
+An error has occurred while reading your 
+'localconfig' file.  The text of the error message is:
+
+$@
+
+Please fix the error in your 'localconfig' file.  
+Alternately rename your 'localconfig' file, rerun 
+checksetup.pl, and re-enter your answers.
+
+  $ mv -f localconfig localconfig.old
+  $ ./checksetup.pl
+
+
+EOT
+die "Syntax error in localconfig";
+}
 my $newstuff = "";
 sub LocalVar ($$)
 {