]> git.donarmstrong.com Git - debhelper.git/commitdiff
avoid undef when dh is run w/o a sequence
authorJoey Hess <joey@kitenet.net>
Sat, 16 Jul 2011 20:09:31 +0000 (16:09 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 16 Jul 2011 20:09:31 +0000 (16:09 -0400)
dh

diff --git a/dh b/dh
index 130d647ead2207734627eadf5859899f9a63614b..f77e5944c641c09f42a32fcd6675b1e4b256a72d 100755 (executable)
--- a/dh
+++ b/dh
@@ -335,7 +335,7 @@ my $sequence;
 if (! compat(7)) {
        # From v8, the sequence is the very first parameter.
        $sequence=shift @ARGV_orig;
-       if ($sequence=~/^-/) {
+       if (defined $sequence && $sequence=~/^-/) {
                error "Unknown sequence $sequence (options should not come before the sequence)";
        }
 }