diff --git a/src/cryfs-cli/program_options/Parser.cpp b/src/cryfs-cli/program_options/Parser.cpp index 9ebf807f..b0802deb 100644 --- a/src/cryfs-cli/program_options/Parser.cpp +++ b/src/cryfs-cli/program_options/Parser.cpp @@ -182,5 +182,5 @@ void Parser::_addPositionalOptionForBaseDir(po::options_description *desc, po::p [[noreturn]] void Parser::_showVersionAndExit() { // no need to show version because it was already shown in the CryFS header before parsing program options - exit(1); + exit(0); } diff --git a/test/cryfs-cli/program_options/ParserTest.cpp b/test/cryfs-cli/program_options/ParserTest.cpp index 45539207..a02d4cf4 100644 --- a/test/cryfs-cli/program_options/ParserTest.cpp +++ b/test/cryfs-cli/program_options/ParserTest.cpp @@ -55,16 +55,6 @@ TEST_F(ProgramOptionsParserTest, ShowCiphers) { ); } - -TEST_F(ProgramOptionsParserTest, Version) { - string expected = "CryFS Version " + gitversion::VersionString(); - EXPECT_EXIT( - parse({"./myExecutable", "--version"}), - ::testing::ExitedWithCode(0), - expected.c_str() - ); -} - TEST_F(ProgramOptionsParserTest, BaseDir_Absolute) { ProgramOptions options = parse({"./myExecutable", "/home/user/baseDir", "/home/user/mountDir"}); EXPECT_EQ("/home/user/baseDir", options.baseDir());