From: Don Armstrong <don@donarmstrong.com>
Date: Wed, 6 Aug 2014 21:25:50 +0000 (-0700)
Subject: if there is no subcommand to debbugs-loadsql, display help
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d8746fb0bc8f3878cd165f414bad3b88af4a560d;p=debbugs.git

if there is no subcommand to debbugs-loadsql, display help
---

diff --git a/bin/debbugs-loadsql b/bin/debbugs-loadsql
index c4722cd0..d6096ba4 100755
--- a/bin/debbugs-loadsql
+++ b/bin/debbugs-loadsql
@@ -184,6 +184,10 @@ if ($options{progress}) {
 
 
 my ($subcommand) = shift @ARGV;
+if (not defined $subcommand) {
+    $subcommand = 'help';
+    print STDERR "You must provide a subcommand; displaying help";
+}
 
 my $opts =
     handle_subcommand_arguments(\@ARGV,$subcommands{$subcommand}{arguments},$gop);