File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,9 @@ namespace ts {
508
508
echo ( s : string ) : void ;
509
509
quit ( exitCode ?: number ) : void ;
510
510
fileExists ( path : string ) : boolean ;
511
+ deleteFile ( path : string ) : boolean ;
512
+ getModifiedTime ( path : string ) : Date ;
513
+ setModifiedTime ( path : string , time : Date ) : void ;
511
514
directoryExists ( path : string ) : boolean ;
512
515
createDirectory ( path : string ) : void ;
513
516
resolvePath ( path : string ) : string ;
@@ -1135,6 +1138,9 @@ namespace ts {
1135
1138
} ,
1136
1139
resolvePath : ChakraHost . resolvePath ,
1137
1140
fileExists : ChakraHost . fileExists ,
1141
+ deleteFile : ChakraHost . deleteFile ,
1142
+ getModifiedTime : ChakraHost . getModifiedTime ,
1143
+ setModifiedTime : ChakraHost . setModifiedTime ,
1138
1144
directoryExists : ChakraHost . directoryExists ,
1139
1145
createDirectory : ChakraHost . createDirectory ,
1140
1146
getExecutingFilePath : ( ) => ChakraHost . executingFile ,
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