confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit 7f328bc95e6a23928d90641b07d01b9be1175e44
parent 0dea138239ffb38fd0b5c06dcd8e3c77ba3e8c66
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Sat, 28 Jun 2014 07:11:17 +0200

handle empty schema message
Diffstat:
Mzsh-functions/confz_postgresql_init | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zsh-functions/confz_postgresql_init b/zsh-functions/confz_postgresql_init @@ -147,7 +147,7 @@ confz_postgresql_schema_check() { (($+vars[port])) && opts+=( --port=$vars[port] ) out=$( confz_do $vars[psql] $opts -AP tuples_only=on -c '\d' $vars[db] ) || die "psql failed" - if [[ -z $out ]]; then + if [[ -z $out || $out == 'No relations found.' ]]; then fail_reason="the schema for ${(qqq)vars[db]} is empty" return 1 elif [[ $out != $vars[schema] ]]; then