Force color for build error messages (#3032)

Since we're using anstream's strip stream, we can force color output
from child processes and strip them when we redirect to a file

Before:


![image](ce8aafe9-687c-4c4a-970a-22abd660bc71)

After:


![image](bacedf1c-2462-4947-bd2f-393476a8031b)

Redirecting to a file correctly strips color codes.
This commit is contained in:
konsti 2024-04-15 18:12:54 +02:00 committed by GitHub
parent eec49ca2b7
commit dd55995768
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -999,6 +999,7 @@ async fn run_python_script(
.env("PATH", modified_path)
// Activate the venv
.env("VIRTUAL_ENV", venv.root())
.env("CLICOLOR_FORCE", "1")
.output()
.await
.map_err(|err| Error::CommandFailed(venv.python_executable().to_path_buf(), err))