From 2bf4d03f5db05e55332412521b899f22a9e867de Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 23 Sep 2020 20:23:47 -0700 Subject: [PATCH] TSCBasic: always report a dumb terminal on Windows Although Windows Terminal should provide a proper tty, for now, always report a dumb terminal. This repairs the rendering of C/C++ diagnostics. Thanks to @albertelrud for the amazing pointer on what it may be! --- Sources/TSCBasic/TerminalController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/TSCBasic/TerminalController.swift b/Sources/TSCBasic/TerminalController.swift index 2706df6c..de3fbb50 100644 --- a/Sources/TSCBasic/TerminalController.swift +++ b/Sources/TSCBasic/TerminalController.swift @@ -110,7 +110,7 @@ public final class TerminalController { /// Computes the terminal type of the stream. public static func terminalType(_ stream: LocalFileOutputByteStream) -> TerminalType { #if os(Windows) - return _isatty(_fileno(stream.filePointer)) == 0 ? .file : .tty + return _isatty(_fileno(stream.filePointer)) == 0 ? .file : .dumb #else if ProcessEnv.vars["TERM"] == "dumb" { return .dumb