MCPcopy
hub / github.com/cli/cli / IsStdoutTTY

Method IsStdoutTTY

pkg/iostreams/iostreams.go:170–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168}
169
170func (s *IOStreams) IsStdoutTTY() bool {
171 if s.stdoutTTYOverride {
172 return s.stdoutIsTTY
173 }
174 // support GH_FORCE_TTY
175 if s.term.IsTerminalOutput() {
176 return true
177 }
178 stdout, ok := s.Out.(*os.File)
179 return ok && isCygwinTerminal(stdout.Fd())
180}
181
182func (s *IOStreams) SetStderrTTY(isTTY bool) {
183 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