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

Method IsStdinTTY

pkg/iostreams/iostreams.go:166–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164}
165
166func (s *IOStreams) IsStdinTTY() bool {
167 if s.stdinTTYOverride {
168 return s.stdinIsTTY
169 }
170 if stdin, ok := s.In.(*os.File); ok {
171 return isTerminal(stdin)
172 }
173 return false
174}
175
176func (s *IOStreams) SetStdoutTTY(isTTY bool) {
177 s.stdoutTTYOverride = true

Callers 8

CanPromptMethod · 0.95
NewCmdAddFunction · 0.80
NewCmdImportFunction · 0.80
NewCmdCreateFunction · 0.80
forkRunFunction · 0.80
NewCmdAddFunction · 0.80
previewPRFunction · 0.80
NewCmdRunFunction · 0.80

Calls 1

isTerminalFunction · 0.85

Tested by

no test coverage detected