Skip to content

Commit 3b6de6c

Browse files
Explain FORCE_COLOR: 3 (#410)
* Explain FORCE_COLOR: 3 * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent cc2e43a commit 3b6de6c

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

.github/workflows/reusable-cookie.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
workflow_call:
55

66
env:
7+
# Many color libraries just need this to be set to any value, but at least
8+
# one distinguishes color depth, where "3" -> "256-bit color".
79
FORCE_COLOR: 3
810

911
jobs:

.github/workflows/reusable-rr-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
workflow_call:
55

66
env:
7+
# Many color libraries just need this to be set to any value, but at least
8+
# one distinguishes color depth, where "3" -> "256-bit color".
79
FORCE_COLOR: 3
810

911
jobs:

docs/pages/guides/tasks.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ action:
8080
8181
You can now access all current versions of Python from nox. At least in GitHub
8282
Actions, you should add `--forcecolor` to your nox runs to get color output in
83-
your logs, or set `env: FORCE_COLOR: 3`. If you'd like to customize the versions
84-
of Python prepared for you, then use input like this:
83+
your logs, or set `env: FORCE_COLOR: 3`[^force_color]. If you'd like to
84+
customize the versions of Python prepared for you, then use input like this:
8585

8686
```yaml
8787
- uses: wntrblm/[email protected]
@@ -371,3 +371,9 @@ using nox include [pip](https://github.com/pypa/pip/blob/main/noxfile.py),
371371
[manylinux](https://github.com/pypa/manylinux/blob/main/noxfile.py),
372372
[packaging](https://github.com/pypa/packaging/blob/main/noxfile.py), and
373373
[packaging.python.org](https://github.com/pypa/packaging.python.org/blob/main/noxfile.py).
374+
375+
[^force_color]:
376+
Many color libraries just need `FORCE_COLOR` to be set to any value, but at
377+
least [one](https://pypi.org/project/plumbum/) distinguishes color depth,
378+
where "3" -> "256-bit color". For many use cases, using `FORCE_COLOR: 1` is
379+
fine.

{{cookiecutter.project_name}}/.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15+
# Many color libraries just need this to be set to any value, but at least
16+
# one distinguishes color depth, where "3" -> "256-bit color".
1517
FORCE_COLOR: 3
1618

1719
jobs:

{{cookiecutter.project_name}}/.github/workflows/{% if cookiecutter.__type!='compiled' %}cd.yml{% endif %}

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
env:
18+
# Many color libraries just need this to be set to any value, but at least
19+
# one distinguishes color depth, where "3" -> "256-bit color".
1820
FORCE_COLOR: 3
1921

2022
jobs:

{{cookiecutter.project_name}}/.github/workflows/{% if cookiecutter.__type=='compiled' %}cd.yml{% endif %}

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
env:
14+
# Many color libraries just need this to be set to any value, but at least
15+
# one distinguishes color depth, where "3" -> "256-bit color".
1416
FORCE_COLOR: 3
1517

1618
jobs:

0 commit comments

Comments
 (0)