mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 09:01:56 +00:00 
			
		
		
		
	issue 2561, send all [bat error]s to stderr in default_error_handler
match default.
This commit is contained in:
		@@ -67,7 +67,9 @@ pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
 | 
				
			|||||||
            .ok();
 | 
					            .ok();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        _ => {
 | 
					        _ => {
 | 
				
			||||||
            writeln!(output, "{}: {}", Red.paint("[bat error]"), error).ok();
 | 
					            // default - always write [bat error] to stderr 
 | 
				
			||||||
 | 
					            let stderr = std::io::stderr();
 | 
				
			||||||
 | 
					            writeln!(&mut stderr.lock(), "{}: {}", Red.paint("[bat error]"), error).ok();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user