Skip to content

Commit

Permalink
feat(stream): Auto-enabled color for CI
Browse files Browse the repository at this point in the history
This is a follow up to #72

CI is a common enough of a piped target that supports ANSI escape codes
for us to treat it like `TERM` detection, I hope.  We'll see how
feedback works out on this.
  • Loading branch information
epage committed Mar 13, 2023
1 parent 0ada0d3 commit 93bd6bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/anstyle-stream/Cargo.toml
Expand Up @@ -34,7 +34,7 @@ anstyle = { version = "0.3.0", path = "../anstyle" }
anstyle-parse = { version = "0.1.0", path = "../anstyle-parse" }
anstyle-wincon = { version = "0.1.0", path = "../anstyle-wincon", optional = true }
concolor-override = { version = "1.0.0", optional = true }
concolor-query = { version = "0.3.0", optional = true }
concolor-query = { version = "0.3.1", optional = true }
is-terminal = { version = "0.4.4", optional = true }
utf8parse = "0.2.1"

Expand Down
4 changes: 3 additions & 1 deletion crates/anstyle-stream/src/auto.rs
Expand Up @@ -36,7 +36,9 @@ where
if raw.is_terminal()
&& !concolor_query::no_color()
&& !clicolor_disabled
&& (concolor_query::term_supports_color() || clicolor_enabled)
&& (concolor_query::term_supports_color()
|| clicolor_enabled
|| concolor_query::is_ci())
|| concolor_query::clicolor_force()
{
Self::always(raw)
Expand Down

0 comments on commit 93bd6bb

Please sign in to comment.