Merge pull request #6510 from dojutsu-user/no_color_6495

Fix: NO_COLOR setting not respected in gh upgrade notice
This commit is contained in:
Mislav Marohnić 2022-10-26 15:57:18 +02:00 committed by GitHub
commit 9ea76237a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,7 @@ func mainRun() exitCode {
}
if !cmdFactory.IOStreams.ColorEnabled() {
surveyCore.DisableColor = true
ansi.DisableColors(true)
} else {
// override survey's poor choice of color
surveyCore.TemplateFuncsWithColor["color"] = func(style string) string {