xbps-query: fix arg[cv] logic added in previous.
This commit is contained in:
parent
0eadaab19d
commit
f1cb7f43dc
@ -153,7 +153,7 @@ main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
props = optarg;
|
props = optarg;
|
||||||
show_prop = opmode = true;
|
show_prop = true;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
if (optarg != NULL) {
|
if (optarg != NULL) {
|
||||||
@ -201,9 +201,9 @@ main(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc > 1)
|
if (argc == optind || (!argc && !opmode)) {
|
||||||
usage(true);
|
usage(true);
|
||||||
else if (!opmode) {
|
} else if (!opmode) {
|
||||||
/* show mode by default */
|
/* show mode by default */
|
||||||
show = opmode = true;
|
show = opmode = true;
|
||||||
pkg = *argv;
|
pkg = *argv;
|
||||||
|
Loading…
Reference in New Issue
Block a user