diff options
| author | Martin Hořeňovský | 2021-12-11 21:48:43 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-12-18 20:49:44 +0100 |
| commit | 3bfe900bbc3f2f066737922c7194a8e2e27a2cda (patch) | |
| tree | 73f2c10cde22cf1acbc327985539df2d1c3c091a /src/catch2/catch_session.cpp | |
| parent | d30d0c01a7505cd27a8ef718bbd50d90b36363c4 (diff) | |
| download | catch3-3bfe900bbc3f2f066737922c7194a8e2e27a2cda.tar.gz | |
Move shard logic check after help flag check
Diffstat (limited to 'src/catch2/catch_session.cpp')
| -rw-r--r-- | src/catch2/catch_session.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 3b58adbd..ed6479e0 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -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 |