mirror of https://github.com/google/oss-fuzz.git
disable ANSI color in the output of `build_fuzzers` when stdin's file descripter is not a terminal (#10632)
For example, ANSI colors will not be used when `stdin` is mapped to `DEVNULL`.
This commit is contained in:
parent
448011e741
commit
c6507f8b8d
|
@ -833,9 +833,11 @@ def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals,to
|
||||||
]
|
]
|
||||||
|
|
||||||
command += [
|
command += [
|
||||||
'-v', f'{project_out}:/out', '-v', f'{project.work}:/work', '-t',
|
'-v', f'{project_out}:/out', '-v', f'{project.work}:/work',
|
||||||
f'gcr.io/oss-fuzz/{project.name}'
|
f'gcr.io/oss-fuzz/{project.name}'
|
||||||
]
|
]
|
||||||
|
if sys.stdin.isatty():
|
||||||
|
command.insert(-1, '-t')
|
||||||
|
|
||||||
result = docker_run(command, architecture=architecture)
|
result = docker_run(command, architecture=architecture)
|
||||||
if not result:
|
if not result:
|
||||||
|
|
Loading…
Reference in New Issue