chiark / gitweb /
dgit: avoid dying with wrong message if compression fails
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jul 2017 19:11:23 +0000 (20:11 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jul 2017 19:11:23 +0000 (20:11 +0100)
When dgit intended to report a decompressor had failed, it would
instead crash with no useful message.  This was due to
generate_commits_from_dsc's @compr_cmd being shadowed inside
the if $compr_ext.

This is part of #857694.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 43f3fd38916f2bac98f06a5e1b0988205fef7e45..6f98813230a8a29db44564cc784bdeaf91e44f29 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2181,7 +2181,7 @@ sub generate_commits_from_dsc () {
                if defined $compr_ext && !defined $cname;
            my $compr_proc =
                new Dpkg::Compression::Process compression => $cname;
-           my @compr_cmd = $compr_proc->get_uncompress_cmdline();
+           @compr_cmd = $compr_proc->get_uncompress_cmdline();
            my $compr_fh = new IO::Handle;
            my $compr_pid = open $compr_fh, "-|" // die $!;
            if (!$compr_pid) {