From: Ian Jackson Date: Sat, 18 Jan 2014 23:34:51 +0000 (+0000) Subject: Use failedcmd to report errors when ssh psql fails. Closes:#734281. X-Git-Tag: debian/0.21~10 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=00ff2e329bed2f77e314381835e3518954ad89d4;ds=sidebyside Use failedcmd to report errors when ssh psql fails. Closes:#734281. --- diff --git a/debian/changelog b/debian/changelog index 595e91e4..6080f8ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ dgit (0.21~~iwj) unstable; urgency=low + * Use failedcmd to report errors when ssh psql fails. Closes:#734281. * Add `Testsuite: autopkgtest' to debian/control. (This will only have the right effect with recent enought dpkg, and will generate a warning with earlier versions of dpkg. diff --git a/dgit b/dgit index 61af3b81..94454d33 100755 --- 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 ?";