File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ namespace ts {
1919 }
2020 }
2121
22+ function defaultIsPretty ( ) {
23+ return ! ! sys . writeOutputIsTTY && sys . writeOutputIsTTY ( ) ;
24+ }
25+
2226 function shouldBePretty ( options : CompilerOptions ) {
2327 if ( typeof options . pretty === "undefined" ) {
24- return ! ! sys . writeOutputIsTTY && sys . writeOutputIsTTY ( ) ;
28+ return defaultIsPretty ( ) ;
2529 }
2630 return options . pretty ;
2731 }
@@ -50,7 +54,7 @@ namespace ts {
5054
5155 export function executeCommandLine ( args : string [ ] ) : void {
5256 if ( args . length > 0 && ( ( args [ 0 ] . toLowerCase ( ) === "--build" ) || ( args [ 0 ] . toLowerCase ( ) === "-b" ) ) ) {
53- const reportDiag = createDiagnosticReporter ( sys , /*pretty*/ true ) ;
57+ const reportDiag = createDiagnosticReporter ( sys , defaultIsPretty ( ) ) ;
5458 const report = ( message : DiagnosticMessage , ...args : string [ ] ) => reportDiag ( createCompilerDiagnostic ( message , ...args ) ) ;
5559 const buildHost : BuildHost = {
5660 error : report ,
You can’t perform that action at this time.
0 commit comments