summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-12-27 09:46:19 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-12-27 12:09:41 +0100
commit12f4b49bb5431ac9e8e5759a78d41dd5fc3c5385 (patch)
treea1d6c0543369e232220fe0d6725784527c1cef67
parent170ccdce77e9d04ce68791a37b96176d5a3dc5d6 (diff)
Improve error message
-rwxr-xr-xbin/apt-why5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/apt-why b/bin/apt-why
index 93a343f..38c967e 100755
--- a/bin/apt-why
+++ b/bin/apt-why
@@ -20,7 +20,7 @@ GetOptions(
'tabwidth=i' => \$tabwidth,
'h|?|help' => \&usage,
);
-my $packagename = shift or die('No packagename given');
+my $packagename = shift or die("Usage: $0 [options] <package>; see $0 --help\n");
my @known;
sub usage {
@@ -69,8 +69,7 @@ if (defined $tabwidth) {
}
if (not defined $cache->{$packagename}) {
- print STDERR "No such package: $packagename\n";
- exit(1);
+ die("No such package: $packagename\n");
}
if ($cache->{$packagename}->{Flags} =~ /Essential/) {