mirror of
https://github.com/sharkdp/bat
synced 2026-08-10 20:01:45 +00:00
fix: display color when NO_COLOR is an empty string (#2767)
This commit is contained in:
@@ -19,7 +19,7 @@ static VERSION: Lazy<String> = Lazy::new(|| {
|
||||
});
|
||||
|
||||
pub fn build_app(interactive_output: bool) -> Command {
|
||||
let color_when = if interactive_output && env::var_os("NO_COLOR").is_none() {
|
||||
let color_when = if interactive_output && !crate::app::env_no_color() {
|
||||
ColorChoice::Auto
|
||||
} else {
|
||||
ColorChoice::Never
|
||||
|
||||
Reference in New Issue
Block a user