MCPcopy Create free account
hub / github.com/catboost/catboost / CalcIsTTY

Method CalcIsTTY

library/cpp/colorizer/colors.cpp:154–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool TColors::CalcIsTTY(FILE* file) {
155 if (GetEnv("ENFORCE_TTY")) {
156 return true;
157 }
158
159#if defined(_unix_)
160 return isatty(fileno(file));
161#else
162 Y_UNUSED(file);
163 return false;
164#endif
165}
166
167TColors::TColors(FILE* f)
168 : IsTTY_(true)

Callers

nothing calls this directly

Calls 2

Y_UNUSEDFunction · 0.85
GetEnvFunction · 0.50

Tested by

no test coverage detected