| 9223 | } |
| 9224 | |
| 9225 | int Session::applyCommandLine( int argc, char const * const * argv ) { |
| 9226 | if( m_startupExceptions ) |
| 9227 | return 1; |
| 9228 | |
| 9229 | auto result = m_cli.parse( clara::Args( argc, argv ) ); |
| 9230 | if( !result ) { |
| 9231 | Catch::cerr() |
| 9232 | << Colour( Colour::Red ) |
| 9233 | << "\nError(s) in input:\n" |
| 9234 | << Column( result.errorMessage() ).indent( 2 ) |
| 9235 | << "\n\n"; |
| 9236 | Catch::cerr() << "Run with -? for usage\n" << std::endl; |
| 9237 | return MaxExitCode; |
| 9238 | } |
| 9239 | |
| 9240 | if( m_configData.showHelp ) |
| 9241 | showHelp(); |
| 9242 | if( m_configData.libIdentify ) |
| 9243 | libIdentify(); |
| 9244 | m_config.reset(); |
| 9245 | return 0; |
| 9246 | } |
| 9247 | |
| 9248 | void Session::useConfigData( ConfigData const& configData ) { |
| 9249 | m_configData = configData; |