You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently some of the tests will fail spuriously when their output is redirected to a file but the environment is not recognised as a CI environment. This unfortunately blocks my project's use of this crate.
The problem is that the code has a hard dependency on the is_terminal method and the tests cannot override that. To fix this, I would propose allowing that behaviour to be overridden with an additional environment variable. This seems reasonable since much of the rest of the crate's behaviour is also governed by environment variables.
I will prepare a PR for you to consider.
The text was updated successfully, but these errors were encountered:
hovinen
added a commit
to hovinen/supports-color
that referenced
this issue
Jul 21, 2023
Currently the tests fail in environments where the output is written to something other than a TTY or a known CI environment. This is because the code makes a hard-coded call to `is_terminal` and disables colour output if that returns false.
This change introduces an environment variable `IGNORE_IS_TERMINAL` which overrides the `is_terminal` check. The tests which depend on colour output now set this environment variable so that they pass in such environments.
Fixeszkat#12
…n by environment variable. (#13)
Fixes: #12
Currently the tests fail in environments where the output is written to something other than a TTY or a known CI environment. This is because the code makes a hard-coded call to `is_terminal` and disables colour output if that returns false.
This change introduces an environment variable `IGNORE_IS_TERMINAL` which overrides the `is_terminal` check. The tests which depend on colour output now set this environment variable so that they pass in such environments.
Currently some of the tests will fail spuriously when their output is redirected to a file but the environment is not recognised as a CI environment. This unfortunately blocks my project's use of this crate.
The problem is that the code has a hard dependency on the
is_terminal
method and the tests cannot override that. To fix this, I would propose allowing that behaviour to be overridden with an additional environment variable. This seems reasonable since much of the rest of the crate's behaviour is also governed by environment variables.I will prepare a PR for you to consider.
The text was updated successfully, but these errors were encountered: