Skip to content

Commit 3645975

Browse files
committed
Prefer IsStdoutTTY when that's all we need
1 parent bf5801e commit 3645975

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cmd/run/rerun/rerun.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func runRerun(opts *RerunOptions) error {
124124
if err != nil {
125125
return err
126126
}
127-
if opts.IO.CanPrompt() {
127+
if opts.IO.IsStdoutTTY() {
128128
fmt.Fprintf(opts.IO.Out, "%s Requested rerun of job %s on run %s\n",
129129
cs.SuccessIcon(),
130130
cs.Cyanf("%d", selectedJob.ID),
@@ -142,7 +142,7 @@ func runRerun(opts *RerunOptions) error {
142142
if err != nil {
143143
return err
144144
}
145-
if opts.IO.CanPrompt() {
145+
if opts.IO.IsStdoutTTY() {
146146
onlyFailedMsg := ""
147147
if opts.OnlyFailed {
148148
onlyFailedMsg = "(failed jobs) "

0 commit comments

Comments
 (0)