File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ namespace ts {
19
19
}
20
20
}
21
21
22
+ function defaultIsPretty ( ) {
23
+ return ! ! sys . writeOutputIsTTY && sys . writeOutputIsTTY ( ) ;
24
+ }
25
+
22
26
function shouldBePretty ( options : CompilerOptions ) {
23
27
if ( typeof options . pretty === "undefined" ) {
24
- return ! ! sys . writeOutputIsTTY && sys . writeOutputIsTTY ( ) ;
28
+ return defaultIsPretty ( ) ;
25
29
}
26
30
return options . pretty ;
27
31
}
@@ -50,7 +54,7 @@ namespace ts {
50
54
51
55
export function executeCommandLine ( args : string [ ] ) : void {
52
56
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 ( ) ) ;
54
58
const report = ( message : DiagnosticMessage , ...args : string [ ] ) => reportDiag ( createCompilerDiagnostic ( message , ...args ) ) ;
55
59
const buildHost : BuildHost = {
56
60
error : report ,
You can’t perform that action at this time.
0 commit comments