Make returncode 0 for --version and --help
authorJoas Schilling <nickvergessen@owncloud.com>
Fri, 23 Oct 2015 13:17:29 +0000 (15:17 +0200)
committerJoas Schilling <nickvergessen@owncloud.com>
Fri, 23 Oct 2015 13:17:29 +0000 (15:17 +0200)
src/cmd/cmd.cpp

index 31d4963f5990781a70914f850e021d3d3f05bb37..970087801385c94bdd744d08c88b0ce173971953 100644 (file)
@@ -158,14 +158,14 @@ void help()
     std::cout << "  -h                     Sync hidden files,do not ignore them" << std::endl;
     std::cout << "  --version, -v          Display version and exit" << std::endl;
     std::cout << "" << std::endl;
-    exit(1);
+    exit(0);
 
 }
 
 void showVersion() {
     const char *binaryName = APPLICATION_EXECUTABLE "cmd";
     std::cout << binaryName << " version " << qPrintable(Theme::instance()->version()) << std::endl;
-    exit(1);
+    exit(0);
 }
 
 void parseOptions( const QStringList& app_args, CmdOptions *options )