Describe the bug
Importing charm.land/lipgloss/v2/compat causes the program to hang when stdin is a pipe (e.g., source <(./program)).
Maybe related to #73?
package main
import (
"fmt"
_ "charm.land/lipgloss/v2/compat"
)
func main() {
fmt.Println("hello")
}
go build -o repro .
./repro # Works
source <(./repro) # Hangs
Setup
Please complete the following information along with version numbers, if applicable.
- OS: Linux
- Shell: zsh
- Terminal Emulator: gnome-terminal
- Terminal Multiplexer: none
- Locale: en_GB.UTF-8
Expected behavior
It not to hang.
I think this is related to HasDarkBackground. If I change the line:
HasDarkBackground = lipgloss.HasDarkBackground(os.Stdin, os.Stdout)
to
Then the hang no longer occurs.
Describe the bug
Importing
charm.land/lipgloss/v2/compatcauses the program to hang when stdin is a pipe (e.g.,source <(./program)).Maybe related to #73?
Setup
Please complete the following information along with version numbers, if applicable.
Expected behavior
It not to hang.
I think this is related to
HasDarkBackground. If I change the line:to
Then the hang no longer occurs.