gpt4 book ai didi

node.js - 如何在 Windows 版 git-bash v.2.8.2 中运行的 nodejs 程序中启用颜色日志?

转载 作者:太空宇宙 更新时间:2023-11-04 00:40:01 26 4
gpt4 key购买 nike

我一直在使用Git for Windows 1.9.5(从 Git-1.9.5-preview20150319.exe 安装)。我的 Nodejs 程序(gulp)在 git-bash 终端中有彩色输出。但是当我卸载 1.9.5 然后安装 2.8.2 (Git-2.8.2-64-bit.exe) 时,除了 git-bash 提示行之外,所有输出都变成单色。如何在这个较新的 2.8.2 版本中利用彩色输出?或者可能还有其他合适的2.x.x版本(Visual Studio Code推荐这个)

最佳答案

创建 Windows environment variable FORCE_COLOR 并将其值设置为 true1

这解决了我的问题以及所有其他使用 Windows 的团队成员遇到的相同颜色问题。

关于node.js - 如何在 Windows 版 git-bash v.2.8.2 中运行的 nodejs 程序中启用颜色日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37255670/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com