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

Method IsStdoutTTY

pkg/iostreams/iostreams.go:182–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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