From 2b72ce2ac0908dae4a39d30b91a28106928168b0 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 24 May 2024 14:37:09 -0400 Subject: tests: Make diff listen to $NO_COLOR --- tests/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/run.sh') diff --git a/tests/run.sh b/tests/run.sh index 381b03e..8c1402d 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -416,8 +416,8 @@ make_xattrs() { EX_DIFF=20 # Detect colored diff support -if diff --color /dev/null /dev/null &>/dev/null; then - DIFF="diff --color" +if ((COLOR_STDERR)) && diff --color=always /dev/null /dev/null &>/dev/null; then + DIFF="diff --color=always" else DIFF="diff" fi -- cgit v1.2.3