apk: properly error out if an unknown command is requested

cute-signatures
William Pitcock 2018-01-09 02:02:03 +00:00
parent 1777040cc5
commit 182bfa0a9f
1 changed files with 5 additions and 1 deletions

View File

@ -579,7 +579,11 @@ int main(int argc, char **argv)
}
if (applet == NULL) {
r = usage(NULL);
if (argc > 1) {
r = 1;
apk_error("'%s' is not an apk command. See 'apk --help'.", argv[1]);
} else
r = usage(NULL);
goto err;
}