Skip to content

Commit 6e7c95b

Browse files
committed
use writeSync instead of stdout.write to make sure that stream is flushed
1 parent 349367d commit 6e7c95b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/compiler/sys.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ var sys: System = (function () {
106106
write(s: string): void {
107107
WScript.StdOut.Write(s);
108108
},
109-
writeErr(s: string): void {
110-
WScript.StdErr.Write(s);
111-
},
112109
readFile: readFile,
113110
writeFile: writeFile,
114111
resolvePath(path: string): string {
@@ -195,10 +192,8 @@ var sys: System = (function () {
195192
newLine: _os.EOL,
196193
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
197194
write(s: string): void {
198-
process.stdout.write(s);
199-
},
200-
writeErr(s: string): void {
201-
process.stderr.write(s);
195+
// 1 is a standard descriptor for stdout
196+
_fs.writeSync(1, s);
202197
},
203198
readFile: readFile,
204199
writeFile: writeFile,

0 commit comments

Comments
 (0)