From 36fb75d6b1f00be240e7acf19e7d87ef24d0951c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 28 Mar 2013 19:55:25 +0100 Subject: [PATCH] Docgen: Re-colourise jsduck warnings. When jsduck is executed in a subshell (as we do, to catch output) it disables the color output. It should have a --color flag, but it doesn't have that, so manually colourise for now. Change-Id: I1f8da523b6b4fc1fc6965f751395f8af497b13b5 --- .docs/generate.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.docs/generate.sh b/.docs/generate.sh index 668ddcb90a..820bd28fa0 100755 --- a/.docs/generate.sh +++ b/.docs/generate.sh @@ -22,7 +22,9 @@ ec=$? rm eg-iframe.html cd - > /dev/null -echo -e "$warnings" +# Re-colorize +NORMAL=$(tput sgr0); YELLOW=$(tput setaf 3); MEGANTA=$(tput setaf 5) +echo "$warnings" | perl -pe "s|^([^ ]+) ([^ ]+) (.*)$|${YELLOW}\1 ${MEGANTA}\2${NORMAL} \3|" # JSDuck doesn't exit with an error code if there are warnings # (only when there are fatal errors). We fixed all warnings