diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-05-15 09:53:14 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-05-15 09:53:14 +0000 |
commit | 08edead3e28bcbaf22ccca4d61e1560d9cf1546d (patch) | |
tree | 062f778c7fdb4a5c7ccc4f0e3e4c6225e77d7bf0 | |
parent | cdf6aff0308da0b4446fe20d3bed751f74acf446 (diff) | |
download | urpmi-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-x | urpmi | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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)) { |