Full adherance to NO_COLOR standard
This commit is contained in:
		@@ -25,7 +25,8 @@ static std::ostream& rgb(std::ostream& out, int r, int g, int b, int code) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool sc::io::should_color(const std::ostream& out) {
 | 
					bool sc::io::should_color(const std::ostream& out) {
 | 
				
			||||||
    return !getenv("NO_COLOR") && isatty_ostream(out);
 | 
					    char* no_color = getenv("NO_COLOR");
 | 
				
			||||||
 | 
					    return !(no_color && no_color[0] != '\0') && isatty_ostream(out);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool sc::io::isatty_ostream(const std::ostream& out) {
 | 
					bool sc::io::isatty_ostream(const std::ostream& out) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user