[svn:DBD-Pg] r11420 - DBD-Pg/trunk/t

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Sat Jun 14 13:14:32 2008
New Revision: 11420

Modified:
   DBD-Pg/trunk/t/dbdpg_test_setup.pl

Log:
Better debugging for initdb problems.


Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl	(original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl	Sat Jun 14 13:14:32 2008
@@ -223,11 +223,19 @@
 		}
 		$info = '';
 		eval {
-			$info = qx{$initdb --help 2>&1};
+			$info = qx{initdb --help 2>&1};
 		};
 		last GETHANDLE if $@;
 		if (!defined $info or $info !~ /\@postgresql\.org/) {
-			$@ = defined $info ? "Bad initdb output: $info" : 'Bad initdb output';
+			if (defined $info) {
+				$@ = "Bad initdb output: $info";
+			}
+			else {
+				my $msg = "Failed to run initdb.";
+				exists $ENV{PGINITDB} and $msg .= " ENV was: $ENV{PGINITDB}";
+				$msg .= " Final call was: $initdb";
+				$@ = $msg;
+			}
 			last GETHANDLE;
 		}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.