Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_session.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-12-11 21:48:43 +0100
committerMartin Hořeňovský2021-12-18 20:49:44 +0100
commit3bfe900bbc3f2f066737922c7194a8e2e27a2cda (patch)
tree73f2c10cde22cf1acbc327985539df2d1c3c091a /src/catch2/catch_session.cpp
parentd30d0c01a7505cd27a8ef718bbd50d90b36363c4 (diff)
downloadcatch3-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.cpp13
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