mirror of https://github.com/catchorg/Catch2.git
Do not open the output file twice
7f229b4f
caused the output file to get opened twice, while
some types of files (e.g. named pipes) can be only opened once.
After this change Session::applyCommandLine opens the output file
only when there is an error to print.
This commit is contained in:
parent
093b72416d
commit
45ebf17ec7
|
@ -171,9 +171,9 @@ namespace Catch {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
auto result = m_cli.parse( clara::Args( argc, argv ) );
|
auto result = m_cli.parse( clara::Args( argc, argv ) );
|
||||||
|
if( !result ) {
|
||||||
config();
|
config();
|
||||||
getCurrentMutableContext().setConfig(m_config);
|
getCurrentMutableContext().setConfig(m_config);
|
||||||
if( !result ) {
|
|
||||||
Catch::cerr()
|
Catch::cerr()
|
||||||
<< Colour( Colour::Red )
|
<< Colour( Colour::Red )
|
||||||
<< "\nError(s) in input:\n"
|
<< "\nError(s) in input:\n"
|
||||||
|
|
Loading…
Reference in New Issue