File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,17 @@ namespace ts {
104
104
return `\x1b[1m${ str } \x1b[22m` ;
105
105
}
106
106
107
+ const isWindows = sys . getEnvironmentVariable ( "OS" ) && stringContains ( sys . getEnvironmentVariable ( "OS" ) . toLowerCase ( ) , "windows" ) ;
108
+ const isWindowsTerminal = sys . getEnvironmentVariable ( "WT_SESSION" ) ;
109
+ const isVSCode = sys . getEnvironmentVariable ( "TERM_PROGRAM" ) && sys . getEnvironmentVariable ( "TERM_PROGRAM" ) === "vscode" ;
110
+
107
111
function blue ( str : string ) {
112
+ // Effectively Powershell and Command prompt users use cyan instead
113
+ // of blue because the default theme doesn't show blue with enough contrast.
114
+ if ( isWindows && ! isWindowsTerminal && ! isVSCode ) {
115
+ return `\x1b[96m${ str } \x1b[39m` ;
116
+ }
117
+
108
118
return `\x1b[94m${ str } \x1b[39m` ;
109
119
}
110
120
You can’t perform that action at this time.
0 commit comments