mirror of
https://github.com/charmbracelet/gum
synced 2024-05-23 16:42:22 +02: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 o.ShowOutput {
|
||||||
if !isTTY {
|
if isTTY {
|
||||||
_, err := os.Stdout.WriteString(m.stdout)
|
_, err := os.Stdout.WriteString(m.stdout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to write to stdout: %w", err)
|
return fmt.Errorf("failed to write to stdout: %w", err)
|
||||||
|
|
Loading…
Reference in a new issue