xbps-query: fail on trailing parameters.

This commit is contained in:
Enno Boland
2015-09-23 13:22:18 +02:00
parent d8fc08eb50
commit f1617441db
2 changed files with 8 additions and 1 deletions

View File

@ -221,7 +221,12 @@ main(int argc, char **argv)
} else if (!opmode) {
/* show mode by default */
show = opmode = true;
pkg = *argv;
pkg = *(argv++);
argc--;
}
if (argc) {
/* trailing parameters */
usage(true);
}
/*
* Initialize libxbps.