diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index ee9d1a9653..6263f7237f 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -6,7 +6,6 @@ namespace ts { newLine: string; useCaseSensitiveFileNames: boolean; write(s: string): void; - writesToTty?(): boolean; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; @@ -379,7 +378,6 @@ namespace ts { write(s: string): void { process.stdout.write(s); }, - writesToTty: () => _tty.isatty(1), readFile, writeFile, watchFile: (fileName, callback) => { diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 66a6cbb65b..f996797db6 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -104,13 +104,12 @@ namespace ts { sys.write(output); } - const shouldUseColors = !!sys.writesToTty && sys.writesToTty(); - const redForegroundEscapeSequence = shouldUseColors ? "\u001b[91m" : ""; - const yellowForegroundEscapeSequence = shouldUseColors ? "\u001b[93m" : ""; - const blueForegroundEscapeSequence = shouldUseColors ? "\u001b[93m" : ""; - const gutterStyleSequence = shouldUseColors ? "\u001b[100;30m" : ""; - const gutterSeparator = shouldUseColors ? " " : " | "; - const resetEscapeSequence = shouldUseColors ? "\u001b[0m" : ""; + const redForegroundEscapeSequence = "\u001b[91m"; + const yellowForegroundEscapeSequence = "\u001b[93m"; + const blueForegroundEscapeSequence = "\u001b[93m"; + const gutterStyleSequence = "\u001b[100;30m"; + const gutterSeparator = " "; + const resetEscapeSequence = "\u001b[0m"; const elipsis = "..."; const categoryFormatMap: Map = { [DiagnosticCategory.Warning]: yellowForegroundEscapeSequence,