Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jsii): color codes are logged to logfiles (#3284)
When the output is not a terminal, color codes get in the way. They lead to unreadable logging like this: ``` monocdk: ^[[96mlib/aws-apigateway/lib/domain-name.ts^[[0m:^[[93m114^[[0m:^[[93m19^[[0m - ^[[93mwarning^[[0m^[[90m JSII5019: ^[[0mThe property name "domainName" conflicts with the declaring class "DomainName". This will result in renaming the class to "_DomainName" in C#. Consider renaming "domainName". monocdk: �[7m114�[0m public readonly domainName: string; monocdk: �[7m �[0m �[93m ~~~~~~~~~~�[0m ``` Don't output color codes if we detect the output is not a TTY. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information