@@ -17,7 +17,6 @@ import (
1717
1818 "github.com/alessio/shellescape"
1919 "github.com/fatih/color"
20- "github.com/mattn/go-isatty"
2120 "github.com/pkg/term/termios"
2221 "golang.design/x/chann"
2322 "golang.org/x/exp/slices"
@@ -35,8 +34,6 @@ var noLongerSpawnChildren = atomic.Bool{}
3534var bold = color .New (color .Bold ).SprintFunc ()
3635var yellow = color .New (color .FgYellow ).SprintFunc ()
3736
38- var stdoutIsTty = isatty .IsTerminal (uintptr (syscall .Stdout ))
39-
4037func writeOut (out * Output ) {
4138 var clearedOutBytes int64
4239
@@ -175,7 +172,7 @@ func displaySequentially(processes <-chan *ProcessResult) (exitCode int) {
175172 var originalTermState * term.State
176173 var err error
177174
178- if stdoutIsTty {
175+ if stdoutIsTty () {
179176 originalTermState , err = term .GetState (syscall .Stdout )
180177 if err != nil {
181178 log .Printf ("Warning: could get terminal state for stdout: %v\n " , err )
@@ -199,7 +196,7 @@ func displaySequentially(processes <-chan *ProcessResult) (exitCode int) {
199196 if * flVerbose {
200197 quotedCommand := shellescape .QuoteCommand (processResult .originalCommand )
201198
202- if firstProcess || ! stdoutIsTty {
199+ if firstProcess || ! stdoutIsTty () {
203200 _ , _ = fmt .Fprintf (os .Stderr , bold ("+ %s" )+ "\n " , quotedCommand )
204201 } else if ! processResult .isAlive () {
205202 _ , _ = fmt .Fprintf (os .Stderr ,
0 commit comments