Skip to content

Commit

Permalink
Merge pull request #3721 from masatake/units-py--NO_COLOR
Browse files Browse the repository at this point in the history
units.py: don't use color if NO_COLOR is specified
  • Loading branch information
masatake authored May 12, 2023
2 parents e1abef6 + 157925f commit 44bd2f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion misc/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,8 @@ def action_run(parser, action, *args):
help='run a test case with specified timeout in seconds. 0 means no timeout (default).')
parser.add_argument('--with-valgrind', action='store_true', default=False,
help='run a test case under valgrind')
parser.add_argument('--colorized-output', choices=['yes', 'no'], default='yes',
parser.add_argument('--colorized-output', choices=['yes', 'no'],
default='yes' if len(os.environ.get('NO_COLOR', "")) == 0 else 'no',
help='print the result in color.')
parser.add_argument('--run-shrink', action='store_true', default=False,
help='(TODO: NOT IMPLEMENTED YET)')
Expand Down

0 comments on commit 44bd2f5

Please sign in to comment.