mirror of
https://github.com/charmbracelet/gum.git
synced 2024-09-11 06:16:03 +03:00
spin: fix isTTY check (#404)
The isTTY check is inverted in the --show-output option for spin, so no output is shown anymore. Fix this by correctly checking if we are a tty or not.
This commit is contained in:
parent
a61f3bdc3f
commit
a63ea30136
@ -46,7 +46,7 @@ func (o Options) Run() error {
|
||||
}
|
||||
|
||||
if o.ShowOutput {
|
||||
if !isTTY {
|
||||
if isTTY {
|
||||
_, err := os.Stdout.WriteString(m.stdout)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to write to stdout: %w", err)
|
||||
|
Loading…
Reference in New Issue
Block a user