Skip to content

Commit

Permalink
Merge pull request #6981 from readthedocs/pass-no-color
Browse files Browse the repository at this point in the history
Pass the NO_COLOR env var to builder
  • Loading branch information
stsewd authored May 27, 2020
2 parents 4624b21 + 41e779c commit b6650e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,9 @@ def get_env_vars(self):
"""Get bash environment variables used for all builder commands."""
env = self.get_rtd_env_vars()

# https://no-color.org/
env['NO_COLOR'] = '1'

if self.config.conda is not None:
env.update({
'CONDA_ENVS_PATH': os.path.join(self.project.doc_path, 'conda'),
Expand Down
1 change: 1 addition & 0 deletions readthedocs/rtd_tests/tests/test_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def test_get_env_vars(self):
task.config = mock.Mock(conda=None)

env = {
'NO_COLOR': '1',
'READTHEDOCS': 'True',
'READTHEDOCS_VERSION': version.slug,
'READTHEDOCS_PROJECT': project.slug,
Expand Down

0 comments on commit b6650e6

Please sign in to comment.