mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17: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:
		 Igor Akhmetov
					Igor Akhmetov
				
			
				
					committed by
					
						 Jozef Grajciar
						Jozef Grajciar
					
				
			
			
				
	
			
			
			 Jozef Grajciar
						Jozef Grajciar
					
				
			
						parent
						
							093b72416d
						
					
				
				
					commit
					45ebf17ec7
				
			| @@ -171,9 +171,9 @@ namespace Catch { | ||||
|             return 1; | ||||
|  | ||||
|         auto result = m_cli.parse( clara::Args( argc, argv ) ); | ||||
|         config(); | ||||
|         getCurrentMutableContext().setConfig( m_config ); | ||||
|         if( !result ) { | ||||
|             config(); | ||||
|             getCurrentMutableContext().setConfig(m_config); | ||||
|             Catch::cerr() | ||||
|                 << Colour( Colour::Red ) | ||||
|                 << "\nError(s) in input:\n" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user