summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-05-15 09:53:14 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-05-15 09:53:14 +0000
commit08edead3e28bcbaf22ccca4d61e1560d9cf1546d (patch)
tree062f778c7fdb4a5c7ccc4f0e3e4c6225e77d7bf0
parentcdf6aff0308da0b4446fe20d3bed751f74acf446 (diff)
downloadurpmi-08edead3e28bcbaf22ccca4d61e1560d9cf1546d.tar
urpmi-08edead3e28bcbaf22ccca4d61e1560d9cf1546d.tar.gz
urpmi-08edead3e28bcbaf22ccca4d61e1560d9cf1546d.tar.bz2
urpmi-08edead3e28bcbaf22ccca4d61e1560d9cf1546d.tar.xz
urpmi-08edead3e28bcbaf22ccca4d61e1560d9cf1546d.zip
Print a clearer usage message when --bug is used alone. (bug #22472)
-rwxr-xr-xurpmi9
1 files changed, 8 insertions, 1 deletions
diff --git a/urpmi b/urpmi
index 1ef41c1d..da08fac8 100755
--- a/urpmi
+++ b/urpmi
@@ -172,7 +172,14 @@ if (grep { $_ eq '--restricted' } @ARGV) {
urpm::args::parse_cmdline(urpm => $urpm);
# Verify that arguments were given
-@ARGV || $auto_select or usage;
+unless (@ARGV || $auto_select) {
+ if ($urpm::args::options{bug}) {
+ print N("Error: To generate a bug report, specify the usual command-line arguments
+along with --bug.\n");
+ exit 1;
+ }
+ usage();
+}
# Process the rest of the arguments
while (defined($_ = shift @ARGV)) {