Don't demand required options if --help or --version is requested.
continuous-integration/drone/push Build is passing Details

Bump version to 0.1.2.
This commit is contained in:
tastytea 2021-05-25 07:12:13 +02:00
parent 28b1d5ec16
commit be229d25d6
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
set(XGETTEXT_CMD "xgettext" CACHE STRING "The command for xgettext.") set(XGETTEXT_CMD "xgettext" CACHE STRING "The command for xgettext.")
project(epubgrep project(epubgrep
VERSION 0.1.1 VERSION 0.1.2
DESCRIPTION "Search tool for EPUB ebooks" DESCRIPTION "Search tool for EPUB ebooks"
LANGUAGES CXX) LANGUAGES CXX)

View File

@ -102,8 +102,11 @@ po::variables_map parse_options(int argc, char *argv[])
} }
catch (const boost::program_options::required_option &e) catch (const boost::program_options::required_option &e)
{ {
cout << options_visible; if (vm.count("help") + vm.count("version") == 0)
std::rethrow_exception(std::current_exception()); {
cout << options_visible;
std::rethrow_exception(std::current_exception());
}
} }
if (vm.count("help") != 0) if (vm.count("help") != 0)