MCPcopy Create free account
hub / github.com/cli/cli / IsStdoutTTY

Method IsStdoutTTY

pkg/iostreams/iostreams.go:181–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181func (s *IOStreams) IsStdoutTTY() bool {
182 if s.stdoutTTYOverride {
183 return s.stdoutIsTTY
184 }
185 // support GH_FORCE_TTY
186 if s.term.IsTerminalOutput() {
187 return true
188 }
189 stdout, ok := s.Out.(*os.File)
190 return ok && isCygwinTerminal(stdout.Fd())
191}
192
193func (s *IOStreams) SetStderrTTY(isTTY bool) {
194 s.stderrTTYOverride = true

Callers 15

StartPagerMethod · 0.95
CanPromptMethod · 0.95
RefreshScreenMethod · 0.95
SystemFunction · 0.95
MainFunction · 0.95
WriteMethod · 0.80
deleteRunFunction · 0.80
deleteCachesFunction · 0.80
listRunFunction · 0.80
NewCmdCompletionFunction · 0.80
viewRunFunction · 0.80
printDiscussionsFunction · 0.80

Calls 3

isCygwinTerminalFunction · 0.85
IsTerminalOutputMethod · 0.65
FdMethod · 0.65

Tested by

no test coverage detected