fix: don't hardcode color profile

This commit is contained in:
Christian Muehlhaeuser 2022-09-08 14:00:35 +02:00
parent e99890aee4
commit 2f165cdfb9
No known key found for this signature in database
GPG key ID: 3A371AA367F6CC1F
3 changed files with 5 additions and 4 deletions

2
go.mod
View file

@ -8,7 +8,7 @@ require (
github.com/charmbracelet/bubbles v0.14.0
github.com/charmbracelet/bubbletea v0.22.2-0.20220901123610-35d4a1d8024d
github.com/charmbracelet/glamour v0.5.1-0.20220727184942-e70ff2d969da
github.com/charmbracelet/lipgloss v0.5.1-0.20220901123808-7bcfa6a70c1f
github.com/charmbracelet/lipgloss v0.5.1-0.20220908142526-5e4540cf9311
github.com/mattn/go-runewidth v0.0.13
github.com/muesli/roff v0.1.0
github.com/muesli/termenv v0.12.1-0.20220901123159-d729275e0977

4
go.sum
View file

@ -22,8 +22,8 @@ github.com/charmbracelet/glamour v0.5.1-0.20220727184942-e70ff2d969da h1:FGz53GW
github.com/charmbracelet/glamour v0.5.1-0.20220727184942-e70ff2d969da/go.mod h1:HXz79SMFnF9arKxqeoHWxmo1BhplAH7wehlRhKQIL94=
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
github.com/charmbracelet/lipgloss v0.5.0/go.mod h1:EZLha/HbzEt7cYqdFPovlqy5FZPj0xFhg5SaqxScmgs=
github.com/charmbracelet/lipgloss v0.5.1-0.20220901123808-7bcfa6a70c1f h1:4971eWB9U7k9iQ7bkmq+3dFZOvuyBvLB5NqFSpQcgwk=
github.com/charmbracelet/lipgloss v0.5.1-0.20220901123808-7bcfa6a70c1f/go.mod h1:Ek+1SCqlTcv+EmSCbyYFCME1gBbjyRImKxlE7h3RiMU=
github.com/charmbracelet/lipgloss v0.5.1-0.20220908142526-5e4540cf9311 h1:D3DuUJ3GFDisVeDmAAA7DI+p9T1O+E2qcfrauYPZvpY=
github.com/charmbracelet/lipgloss v0.5.1-0.20220908142526-5e4540cf9311/go.mod h1:Ek+1SCqlTcv+EmSCbyYFCME1gBbjyRImKxlE7h3RiMU=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View file

@ -28,7 +28,8 @@ var (
var bubbleGumPink = lipgloss.NewStyle().Foreground(lipgloss.Color("212"))
func main() {
lipgloss.SetColorProfile(termenv.ANSI256)
output := termenv.NewOutput(os.Stderr, termenv.WithColorCache(true))
lipgloss.SetOutput(output)
if Version == "" {
if info, ok := debug.ReadBuildInfo(); ok && info.Main.Sum != "" {