diff --git a/pkg/internal/env/term.go b/pkg/internal/env/term.go index a0be1e6eb7..5f809dd9f0 100644 --- a/pkg/internal/env/term.go +++ b/pkg/internal/env/term.go @@ -68,7 +68,13 @@ func isSmartTerminal(w io.Writer, GOOS string, lookupEnv func(string) (string, b // Explicitly dumb terminals are not smart // https://en.wikipedia.org/wiki/Computer_terminal#Dumb_terminals - if getenv("TERM") == "dumb" { + term := getenv("TERM") + if term == "dumb" { + return false + } + // st has some bug 🤷‍♂️ + // https://github.com/kubernetes-sigs/kind/issues/1892 + if term == "st-256color" { return false } diff --git a/pkg/internal/env/term_test.go b/pkg/internal/env/term_test.go index f998c80b54..da9a276bff 100644 --- a/pkg/internal/env/term_test.go +++ b/pkg/internal/env/term_test.go @@ -117,6 +117,15 @@ func TestIsSmartTerminal(t *testing.T) { IsSmart: false, Writer: &testFakeTTY{}, }, + { + Name: "tty, TERM=st-256color", + FakeEnv: map[string]string{ + "TERM": "st-256color", + }, + GOOS: "linux", + IsSmart: false, + Writer: &testFakeTTY{}, + }, } for _, tc := range cases { tc := tc // capture tc