Package: devscripts
Version: 2.11.9
Severity: minor

Dear Devscripts Maintainers,

In a offline session I typoed rc-alert --hepl,
whereupon wget call attempt kicked in:

Unknown option: hepl
rc-alert: wget failed!

(in a online session) followed by excessive bug list, instead
of just barfing at me and/or showing me the help blurb:

diff --git a/scripts/rc-alert.pl b/scripts/rc-alert.pl
index 610cc65..63c099e 100755
--- a/scripts/rc-alert.pl
+++ b/scripts/rc-alert.pl
@@ -138,7 +138,7 @@ GetOptions("help|h" => \$opt_help,
           "popcon" => \$popcon,
           "pc-vote" => \$popcon_by_vote,
           "pc-local" => \$popcon_local,
-          );
+          ) or exit 1;
 
 if ($opt_help) { print $usage; exit 0; }
 if ($opt_version) { print $version; exit 0; }



Or even more lazy:
-          );
+          ) or print $usage and exit 1;

so the reader won't get a chance to re-type and typ0 it
once again, but just the help :P



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to