I have a mix task that runs invokes
mix test with various environment variables (MIX_ENV=xxx). The line for the invocation essentially looks like this:
System.cmd("mix", ["test", "--color"], into: IO.stream(:stdio, :line))
That gives me colorized output for the tests.
However, if any compiling takes place before running the tests, the output is not colorized. So I might get warnings but they won’t be yellow.
This can also be reproduced by replacing the invocation of
mix test directly with
How can I get the output fully colorized?