Просмотр исходного кода

Make returncode 0 for --version and --help

Joas Schilling 10 лет назад
Родитель
Сommit
6d87bd15cd
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/cmd/cmd.cpp

+ 2 - 2
src/cmd/cmd.cpp

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