mirror of
https://github.com/charmbracelet/gum
synced 2024-06-08 16:52:17 +02:00
Update command.go
Added comments to explain output logic
This commit is contained in:
parent
d66af4f082
commit
2a84b71b82
|
@ -47,6 +47,8 @@ func (o Options) Run() error {
|
|||
}
|
||||
|
||||
if o.ShowOutput {
|
||||
// BubbleTea writes the View() to stderr.
|
||||
// If the program is being piped then put the accumulated output in stdout.
|
||||
if !isTTY {
|
||||
_, err := os.Stdout.WriteString(m.stdout)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue