| 9144 | } |
| 9145 | |
| 9146 | int Session::applyCommandLine(int argc, char const *const *argv) { |
| 9147 | if (m_startupExceptions) |
| 9148 | return 1; |
| 9149 | |
| 9150 | auto result = m_cli.parse(clara::Args(argc, argv)); |
| 9151 | if (!result) { |
| 9152 | Catch::cerr() << Colour(Colour::Red) << "\nError(s) in input:\n" |
| 9153 | << Column(result.errorMessage()).indent(2) << "\n\n"; |
| 9154 | Catch::cerr() << "Run with -? for usage\n" << std::endl; |
| 9155 | return MaxExitCode; |
| 9156 | } |
| 9157 | |
| 9158 | if (m_configData.showHelp) |
| 9159 | showHelp(); |
| 9160 | if (m_configData.libIdentify) |
| 9161 | libIdentify(); |
| 9162 | m_config.reset(); |
| 9163 | return 0; |
| 9164 | } |
| 9165 | |
| 9166 | void Session::useConfigData(ConfigData const &configData) { |
| 9167 | m_configData = configData; |