【发布时间】:2019-04-14 07:40:57
【问题描述】:
我想在 jenkins 中显示由 node.js 生成的彩色输出
两者分开工作,但不结合:
节点脚本 我的测试脚本 test.js:
console.log(require("chalk").red("Node Red"))
在 shell 中调用测试脚本有效:
node test.js => OK
在 jenkins 中调用彩色 shell 脚本有效:
echo -e "\033[31mShell Red\033[0m" => OK
但在 jenkins 中调用节点脚本不会显示任何颜色:
node test.js => No Color, when executed in jenkins
【问题讨论】: