@@ -866,7 +866,6 @@ int main(int argc, char** argv)
866866 po::variables_map variables;
867867 bool showUsage = false ;
868868 bool showVersion = false ;
869- bool buildCustom = false ;
870869 bool verbose = false ;
871870 bool noIntrospection = false ;
872871 std::string schemaFileName;
@@ -907,28 +906,21 @@ int main(int argc, char** argv)
907906 variables);
908907 po::notify (variables);
909908
910- // If you specify any of these parameters, you must specify all three.
911- buildCustom = !schemaFileName.empty () || !requestFileName.empty () || !filenamePrefix.empty ()
912- || !schemaNamespace.empty ();
913-
914- if (buildCustom)
909+ if (schemaFileName.empty ())
915910 {
916- if (schemaFileName.empty ())
917- {
918- throw po::required_option (" schema" );
919- }
920- else if (requestFileName.empty ())
921- {
922- throw po::required_option (" request" );
923- }
924- else if (filenamePrefix.empty ())
925- {
926- throw po::required_option (" prefix" );
927- }
928- else if (schemaNamespace.empty ())
929- {
930- throw po::required_option (" namespace" );
931- }
911+ throw po::required_option (" schema" );
912+ }
913+ else if (requestFileName.empty ())
914+ {
915+ throw po::required_option (" request" );
916+ }
917+ else if (filenamePrefix.empty ())
918+ {
919+ throw po::required_option (" prefix" );
920+ }
921+ else if (schemaNamespace.empty ())
922+ {
923+ throw po::required_option (" namespace" );
932924 }
933925 }
934926 catch (const po::error& oe)
@@ -943,7 +935,7 @@ int main(int argc, char** argv)
943935 outputVersion (std::cout);
944936 return 0 ;
945937 }
946- else if (showUsage || !buildCustom )
938+ else if (showUsage)
947939 {
948940 outputUsage (std::cout, options);
949941 return 0 ;
0 commit comments