From a63ea3013655d53c844401ff0ef32b1e521a1f33 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 28 Jul 2023 16:40:18 +0200 Subject: [PATCH] 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. --- spin/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spin/command.go b/spin/command.go index 9482b7f..582cfb0 100644 --- a/spin/command.go +++ b/spin/command.go @@ -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)