Stop setting `CLICOLOR_FORCE=1` when calling build backends (#15472)

## Summary

`CLICOLOR_FORCE` changes the output of underlying build commands, which
messes with wrapper tools trying to parse their output.

Closes #12564, closes #15415.
This commit is contained in:
Zsolt Dollenstein 2025-08-27 16:28:02 +01:00 committed by GitHub
parent 9108b04642
commit 83e42fdd13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -1159,7 +1159,10 @@ impl PythonRunner {
.envs(environment_variables) .envs(environment_variables)
.env(EnvVars::PATH, modified_path) .env(EnvVars::PATH, modified_path)
.env(EnvVars::VIRTUAL_ENV, venv.root()) .env(EnvVars::VIRTUAL_ENV, venv.root())
.env(EnvVars::CLICOLOR_FORCE, "1") // NOTE: it would be nice to get colored output from build backends,
// but setting CLICOLOR_FORCE=1 changes the output of underlying
// tools, which might mess with wrappers trying to parse their
// output.
.env(EnvVars::PYTHONIOENCODING, "utf-8:backslashreplace") .env(EnvVars::PYTHONIOENCODING, "utf-8:backslashreplace")
.stdout(std::process::Stdio::piped()) .stdout(std::process::Stdio::piped())
.stderr(std::process::Stdio::piped()) .stderr(std::process::Stdio::piped())