Prefer IsStdoutTTY when that's all we need

This commit is contained in:
Cameron Booth 2022-03-14 10:00:29 -07:00
parent bf5801e646
commit 3645975da7

View file

@ -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) "