From 3645975da763411b0c0d9b7482be5bed774b6509 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Mon, 14 Mar 2022 10:00:29 -0700 Subject: [PATCH] Prefer IsStdoutTTY when that's all we need --- pkg/cmd/run/rerun/rerun.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/run/rerun/rerun.go b/pkg/cmd/run/rerun/rerun.go index 21a3c31d1..e382fd134 100644 --- a/pkg/cmd/run/rerun/rerun.go +++ b/pkg/cmd/run/rerun/rerun.go @@ -124,7 +124,7 @@ func runRerun(opts *RerunOptions) error { if err != nil { return err } - if opts.IO.CanPrompt() { + if opts.IO.IsStdoutTTY() { fmt.Fprintf(opts.IO.Out, "%s Requested rerun of job %s on run %s\n", cs.SuccessIcon(), cs.Cyanf("%d", selectedJob.ID), @@ -142,7 +142,7 @@ func runRerun(opts *RerunOptions) error { if err != nil { return err } - if opts.IO.CanPrompt() { + if opts.IO.IsStdoutTTY() { onlyFailedMsg := "" if opts.OnlyFailed { onlyFailedMsg = "(failed jobs) "