Skip to content
Myr

Merge branch '1'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parents bc86938, dc7e0e0 · Browse files · 2 files+10 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+10 added−1 removed

  • other:+10 added−1 removed

2 files+10 added−1 removed

modified:src/options.rs+9 added-1 removed
1use std::fs::File;2use std::path::PathBuf;3use std::process::{Command, Stdio};4use std::{cmp, fmt, io};4use std::{cmp, env, fmt, io};56use anyhow::ensure;7use atty::Stream;8use clap::ArgMatches;
288 unmodified lines
297 if options.command_output_policy == CommandOutputPolicy::Inherit298 || !atty::is(Stream::Stdout)299 {300 OutputStyleOption::Basic301 } else if env::var_os("TERM")302 .map(|t| t == "unknown" || t == "dumb")303 .unwrap_or(true)304 || env::var_os("NO_COLOR")305 .map(|t| !t.is_empty())306 .unwrap_or(false)307 {308 OutputStyleOption::NoColor309 } else {310 OutputStyleOption::Full311 }312 }
95 unmodified lines
modified:CHANGELOG.md+1 added
1# unreleased23## Features45- Disable colorized output in case of `TERM=dumb` or `NO_COLOR=1`, see #542 and #555 (@nabijaczleweli)67## Changes89
314 unmodified lines