[openwrt/openwrt] env: only use color diffs on terminals
LEDE Commits
lede-commits at lists.infradead.org
Sat May 5 00:50:00 PDT 2018
blogic pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/e495a050693952956a81847669b8b7888b4cd769
commit e495a050693952956a81847669b8b7888b4cd769
Author: Philip Prindeville <philipp at redfish-solutions.com>
AuthorDate: Tue Apr 10 16:57:06 2018 -0600
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 <philipp at redfish-solutions.com>
---
scripts/env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/env b/scripts/env
index 63e26eb..84166ae 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
}
More information about the lede-commits
mailing list