File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ require (
5757 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
5858 golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
5959 golang.org/x/sync v0.19.0 // indirect
60- golang.org/x/sys v0.42.0 // indirect
60+ golang.org/x/sys v0.43.0 // indirect
61+ golang.org/x/term v0.42.0 // indirect
6162 gopkg.in/yaml.v3 v3.0.1 // indirect
6263 modernc.org/libc v1.66.10 // indirect
6364 modernc.org/mathutil v1.7.1 // indirect
Original file line number Diff line number Diff line change @@ -117,6 +117,10 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc
117117golang.org/x/sys v0.6.0 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
118118golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo =
119119golang.org/x/sys v0.42.0 /go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw =
120+ golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI =
121+ golang.org/x/sys v0.43.0 /go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw =
122+ golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY =
123+ golang.org/x/term v0.42.0 /go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY =
120124golang.org/x/text v0.3.0 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
121125golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM =
122126golang.org/x/text v0.31.0 /go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM =
Original file line number Diff line number Diff line change 88 "strings"
99
1010 "charm.land/lipgloss/v2"
11+ "golang.org/x/term"
1112 "golang.org/x/text/cases"
1213 "golang.org/x/text/language"
1314)
8182)
8283
8384func init () {
84- isDark := lipgloss .HasDarkBackground (os .Stdin , os .Stdout )
85+ isDark := true
86+ if term .IsTerminal (int (os .Stdin .Fd ())) && term .IsTerminal (int (os .Stdout .Fd ())) {
87+ isDark = lipgloss .HasDarkBackground (os .Stdin , os .Stdout )
88+ }
8589 ld := lipgloss .LightDark (isDark )
8690 YellowAdaptive = ld (lipgloss .Color (DarkYellow ), lipgloss .Color (LightYellow ))
8791 YellowAdaptive2 = ld (lipgloss .Color (DarkYellow ), lipgloss .Color (PrimaryYellow ))
You can’t perform that action at this time.
0 commit comments