[maven-debian-helper] 04/06: Disable the color output if the terminal doesn't support colors
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Sat Aug 26 23:10:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository maven-debian-helper.
commit 969f6004028a687a953be08b441ec392272b549f
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Sun Aug 27 01:06:13 2017 +0200
Disable the color output if the terminal doesn't support colors
---
debian/changelog | 1 +
share/perl/maven.pm | 3 +++
2 files changed, 4 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index d5f2bef..274c7f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ maven-debian-helper (2.2.3) UNRELEASED; urgency=medium
* Spawn a shell explicitly when necessary in the doit() calls of the DH
buildsystem (prevents a warning with DH 10 and an error with DH 11)
(Closes: #870404)
+ * Disable the color output if the terminal doesn't support colors
* Honor the "nodoc" build option and skip the javadoc generation
* Added the project.build.sourceEncoding property in the documentation
header of the generated maven.properties file
diff --git a/share/perl/maven.pm b/share/perl/maven.pm
index cbbcc58..27ec4b2 100644
--- a/share/perl/maven.pm
+++ b/share/perl/maven.pm
@@ -47,6 +47,9 @@ sub new {
"-s/etc/maven/settings-debian.xml",
"-Ddebian.dir=$this->{cwd}/debian",
"-Dmaven.repo.local=$this->{cwd}/debian/maven-repo");
+ if (!(`tput colors 2>/dev/null` >= 8)) {
+ push (@{$this->{maven_cmd}}, "--batch-mode");
+ }
return $this;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-debian-helper.git
More information about the pkg-java-commits
mailing list