| 15600 | } |
| 15601 | |
| 15602 | int Session::applyCommandLine(int argc, char const *const *argv) |
| 15603 | { |
| 15604 | if (m_startupExceptions) |
| 15605 | return 1; |
| 15606 | |
| 15607 | auto result = m_cli.parse(clara::Args(argc, argv)); |
| 15608 | if (!result) { |
| 15609 | config(); |
| 15610 | getCurrentMutableContext().setConfig(m_config); |
| 15611 | Catch::cerr() |
| 15612 | << Colour(Colour::Red) << "\nError(s) in input:\n" |
| 15613 | << Column(result.errorMessage()).indent(2) << "\n\n"; |
| 15614 | Catch::cerr() << "Run with -? for usage\n" << std::endl; |
| 15615 | return MaxExitCode; |
| 15616 | } |
| 15617 | |
| 15618 | if (m_configData.showHelp) |
| 15619 | showHelp(); |
| 15620 | if (m_configData.libIdentify) |
| 15621 | libIdentify(); |
| 15622 | m_config.reset(); |
| 15623 | return 0; |
| 15624 | } |
| 15625 | |
| 15626 | #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE) |
| 15627 | int Session::applyCommandLine(int argc, wchar_t const *const *argv) |