Move shard logic check after help flag check

This commit is contained in:
Martin Hořeňovský 2021-12-11 21:48:43 +01:00
parent d30d0c01a7
commit 3bfe900bbc
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -257,16 +257,17 @@ namespace Catch {
if( m_startupExceptions )
return 1;
if( m_configData.shardIndex >= m_configData.shardCount ) {
Catch::cerr() << "The shard count (" << m_configData.shardCount << ") must be greater than the shard index (" << m_configData.shardIndex << ")\n" << std::flush;
return 1;
}
if (m_configData.showHelp || m_configData.libIdentify) {
return 0;
}
if ( m_configData.shardIndex >= m_configData.shardCount ) {
Catch::cerr() << "The shard count (" << m_configData.shardCount
<< ") must be greater than the shard index ("
<< m_configData.shardIndex << ")\n"
<< std::flush;
return 1;
}
CATCH_TRY {
config(); // Force config to be constructed