Merge pull request #533 from cqexbesd/colour

Enable colour only when writing to a tty
This commit is contained in:
Christer Edwards
2022-07-23 21:23:16 -06:00
committed by GitHub

View File

@@ -38,7 +38,7 @@ enable_color() {
}
# If "NO_COLOR" environment variable is present, disable output colors.
if [ -z "${NO_COLOR}" ]; then
if [ -z "${NO_COLOR}" -a -t 1 ]; then
enable_color
fi