Skip to content

Commit 93bd6bb

Browse files
committed
feat(stream): Auto-enabled color for CI
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.
1 parent 0ada0d3 commit 93bd6bb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/anstyle-stream/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ anstyle = { version = "0.3.0", path = "../anstyle" }
3434
anstyle-parse = { version = "0.1.0", path = "../anstyle-parse" }
3535
anstyle-wincon = { version = "0.1.0", path = "../anstyle-wincon", optional = true }
3636
concolor-override = { version = "1.0.0", optional = true }
37-
concolor-query = { version = "0.3.0", optional = true }
37+
concolor-query = { version = "0.3.1", optional = true }
3838
is-terminal = { version = "0.4.4", optional = true }
3939
utf8parse = "0.2.1"
4040

crates/anstyle-stream/src/auto.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ where
3636
if raw.is_terminal()
3737
&& !concolor_query::no_color()
3838
&& !clicolor_disabled
39-
&& (concolor_query::term_supports_color() || clicolor_enabled)
39+
&& (concolor_query::term_supports_color()
40+
|| clicolor_enabled
41+
|| concolor_query::is_ci())
4042
|| concolor_query::clicolor_force()
4143
{
4244
Self::always(raw)

0 commit comments

Comments
 (0)