From: Greg Sabino Mullane Date: Mon, 16 Feb 2009 14:02:58 +0000 (-0500) Subject: Throw an exception when NO_PSQL_OPTION is off but --PSQL is used. X-Git-Tag: 2.9.0~168 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=5c40c62b533acbde565a71d5d5d9259a388f439a;p=check_postgres.git Throw an exception when NO_PSQL_OPTION is off but --PSQL is used. --- diff --git a/check_postgres.pl b/check_postgres.pl index b4490684a..96fef3779 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -261,6 +261,7 @@ our %msg = ( 'symlink-done' => qq{Not creating "\$1": \$2 already linked to "\$3"\n}, 'symlink-fail' => qq{Could not symlink \$1 to \$2: \$3\n}, 'no-target-database' => q{No target databases could be found}, + 'psql-no-opt' => q{Cannot use the --PSQL option when NO_PSQL_OPTION is on}, }, 'de' => { 'T-BAD-QUERY' => q{Invalid query returned:}, @@ -399,7 +400,7 @@ sub msg { ## Everything from here on out needs psql, so find and verify a working version: if ($NO_PSQL_OPTION) { - delete $opt{PSQL}; + delete $opt{PSQL} and ndie msg('psql-no-opt'); } if (! defined $PSQL or ! length $PSQL) {