aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/getopt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/getopt.cpp')
-rw-r--r--src/cli/getopt.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cli/getopt.cpp b/src/cli/getopt.cpp
index 7b7e14932..fde3b5ce9 100644
--- a/src/cli/getopt.cpp
+++ b/src/cli/getopt.cpp
@@ -16,8 +16,14 @@ void OptionParser::parse(const std::vector<std::string> &args)
{
std::string arg = args[j];
+ // FIXME: cli app must manually query if user requested help
+ // in order to be able to stop the cpp. At the moment e.g.
+ // `./botan keygen --help` generates keys.
if(arg == "help" || arg == "--help" || arg == "-h")
- return help(std::cout, appname);
+ {
+ help(std::cout, appname);
+ return;
+ }
if(arg.size() > 2 && arg[0] == '-' && arg[1] == '-')
{