mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
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 ) );
|
||||||
config();
|
|
||||||
getCurrentMutableContext().setConfig( m_config );
|
|
||||||
if( !result ) {
|
if( !result ) {
|
||||||
|
config();
|
||||||
|
getCurrentMutableContext().setConfig(m_config);
|
||||||
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
Block a user