We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a23d5c + 1022d85 commit 58bb41cCopy full SHA for 58bb41c
Sources/TSCBasic/TerminalController.swift
@@ -112,15 +112,13 @@ public final class TerminalController {
112
113
/// Computes the terminal type of the stream.
114
public static func terminalType(_ stream: LocalFileOutputByteStream) -> TerminalType {
115
-#if os(Windows)
116
- return _isatty(_fileno(stream.filePointer)) == 0 ? .file : .dumb
117
-#else
+#if !os(Windows)
118
if ProcessEnv.vars["TERM"] == "dumb" {
119
return .dumb
120
}
+#endif
121
let isTTY = isatty(fileno(stream.filePointer)) != 0
122
return isTTY ? .tty : .file
123
-#endif
124
125
126
/// Tries to get the terminal width first using COLUMNS env variable and
0 commit comments