mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-21 13:04:42 +02:00
feat: Auto-detect term for coloring helm-diff output
Since helm-diff has added an ability to auto-detect the term to decide if it should output with color or not, helmfile had been defaulted to no-color. This resoloves that, by adding a term-detection logic that is same as helm-diff. As a part of this work, I have also implemented a new global flag `--color`, which is used for forcing color without relying on the term-detection logic implemented in helmfile or explicitly setting the HELM_DIFF_COLOR envvar. I hope it is useful for folks. Ref https://github.com/roboll/helmfile/issues/2043 Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
@@ -93,6 +93,10 @@ func (a diffConfig) SuppressDiff() bool {
|
||||
return a.suppressDiff
|
||||
}
|
||||
|
||||
func (a diffConfig) Color() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (a diffConfig) NoColor() bool {
|
||||
return a.noColor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user