[libtest-bdd-cucumber-perl] 11/25: Do not force overwrite $ENV{ANSI_COLOR_DISABLED} in bin/pherkin
Intrigeri
intrigeri at moszumanska.debian.org
Mon Apr 27 09:51:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch master
in repository libtest-bdd-cucumber-perl.
commit 8cc3d5cb32cddc44b37e2fb2795e92212da46b79
Author: Tomas Pokorny <tnt at verotel.cz>
Date: Thu Apr 9 11:44:00 2015 +0000
Do not force overwrite $ENV{ANSI_COLOR_DISABLED} in bin/pherkin
if STDOUT is not terminal.
Do it only if $ENV{ANSI_COLOR_DISABLED} is not defined.
So that it is possible write colorized output to pipe or output file,
for example:
shell#> ANSI_COLOR_DISABLED=0 pherkin tests/* > colorized-output.txt
---
bin/pherkin | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/pherkin b/bin/pherkin
index bc39670..fa1643a 100755
--- a/bin/pherkin
+++ b/bin/pherkin
@@ -74,7 +74,7 @@ use warnings;
use App::pherkin;
BEGIN {
- if ( not -t STDOUT ) {
+ if ( not -t STDOUT and not defined $ENV{'ANSI_COLORS_DISABLED'} ) {
$ENV{'ANSI_COLORS_DISABLED'} = 1;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtest-bdd-cucumber-perl.git
More information about the Pkg-perl-cvs-commits
mailing list