diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-01-09 02:02:03 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-01-09 17:07:22 +0000 |
commit | 182bfa0a9f0eb804408dddaf714e6fde1483730d (patch) | |
tree | 69e2a65b73d18601a49b98854158908d27a7850e | |
parent | 1777040cc5cefcb24287505f04af250fc7da4840 (diff) | |
download | apk-tools-182bfa0a9f0eb804408dddaf714e6fde1483730d.tar.gz apk-tools-182bfa0a9f0eb804408dddaf714e6fde1483730d.tar.bz2 apk-tools-182bfa0a9f0eb804408dddaf714e6fde1483730d.tar.xz apk-tools-182bfa0a9f0eb804408dddaf714e6fde1483730d.zip |
apk: properly error out if an unknown command is requested
-rw-r--r-- | src/apk.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |