diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-31 18:12:59 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-31 18:25:28 +0100 |
commit | b5f605a1e7d6a92c07636b378deb74e895b0967e (patch) | |
tree | ee867cccc71d18a0ca84368691c390585a650a38 /Debian/Dgit.pm | |
parent | 1f80529a13489abd8606d95045d264733390903a (diff) |
Dgit.pm: cmdoutput: Handle undef in arg crash better
Use `confess' which produces a stack trace. And don't forget to use
Data::Dumper;
Bug introduced in e6ce71a87a1c "Move various useful functions into
Dgit.pm [...]".
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian/Dgit.pm')
-rw-r--r-- | Debian/Dgit.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index aa0c5a3..cb4a599 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -5,10 +5,12 @@ package Debian::Dgit; use strict; use warnings; +use Carp; use POSIX; use IO::Handle; use Config; use Digest::SHA; +use Data::Dumper; BEGIN { use Exporter (); @@ -208,7 +210,7 @@ sub failedcmd { } sub cmdoutput_errok { - die Dumper(\@_)." ?" if grep { !defined } @_; + confess Dumper(\@_)." ?" if grep { !defined } @_; debugcmd "|",@_; open P, "-|", @_ or die "$_[0] $!"; my $d; |