Skip to content

Commit 2bf4d03

Browse files
committed
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!
1 parent 58a9c90 commit 2bf4d03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/TSCBasic/TerminalController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public final class TerminalController {
110110
/// Computes the terminal type of the stream.
111111
public static func terminalType(_ stream: LocalFileOutputByteStream) -> TerminalType {
112112
#if os(Windows)
113-
return _isatty(_fileno(stream.filePointer)) == 0 ? .file : .tty
113+
return _isatty(_fileno(stream.filePointer)) == 0 ? .file : .dumb
114114
#else
115115
if ProcessEnv.vars["TERM"] == "dumb" {
116116
return .dumb

0 commit comments

Comments
 (0)