chiark / gitweb /
Use failedcmd to report errors when ssh psql fails. Closes:#734281.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 61af3b81f00a82a323e17e14092c78d8694b6058..94454d33170b15546c42f0d42c77f27d0453ba7f 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -676,7 +676,7 @@ sub sshpsql ($$) {
        printdebug("$debugprefix>|$_|\n");
        push @rows, $_;
     }
-    $!=0; $?=0; close P or die "$! $?";
+    $!=0; $?=0; close P or failedcmd @cmd;
     @rows or die;
     my $nrows = pop @rows;
     $nrows =~ s/^\((\d+) rows?\)$/$1/ or die "$nrows ?";