Skip to content

Document FORCE_COLOR #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pages/docs/manual/v12.0.0/build-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,12 @@ To enable genType, set `"gentypeconfig"` at top level in the project's `rescript

We heavily disrecommend the usage of environment variables, but for certain cases, they're justified.

### Error Output Coloring: `NINJA_ANSI_FORCED`
### Error Output Coloring: `FORCE_COLOR`

This is mostly for other programmatic usage of `rescript` where outputting colors is not desired.

When `NINJA_ANSI_FORCED` is set to `1`: `rescript` produces color.
When `NINJA_ANSI_FORCED` is set to `0`: `rescript` doesn't produce color.
When `NINJA_ANSI_FORCED` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted.
When `FORCE_COLOR` is set to `1`: `rescript` produces color.
When `FORCE_COLOR` is set to `0`: `rescript` doesn't produce color.
When `FORCE_COLOR` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted.

> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163).