From: Philip Prindeville Date: Tue, 10 Apr 2018 22:57:06 +0000 (-0600) Subject: env: only use color diffs on terminals X-Git-Tag: v18.06.0-rc1~256 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e495a050693952956a81847669b8b7888b4cd769;p=oweals%2Fopenwrt.git env: only use color diffs on terminals When sending script/env diff's output to a file or pipeline, you don't want escape characters for ANSI color sequences fouling the byte stream. Signed-off-by: Philip Prindeville --- diff --git a/scripts/env b/scripts/env index 63e26eb154..84166ae5fe 100755 --- a/scripts/env +++ b/scripts/env @@ -104,7 +104,7 @@ env_list() { env_diff() { env_init env_sync_data - git diff --cached --color + git diff --cached --color=auto env_link_config }