From 6e7c95b8178dc37fbbec90b0c0bbf4a5087a6cf5 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 12 Aug 2014 11:30:11 -0700 Subject: [PATCH] use writeSync instead of stdout.write to make sure that stream is flushed --- src/compiler/sys.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index e215979d2dc94..d6c19e61bb414 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -106,9 +106,6 @@ var sys: System = (function () { write(s: string): void { WScript.StdOut.Write(s); }, - writeErr(s: string): void { - WScript.StdErr.Write(s); - }, readFile: readFile, writeFile: writeFile, resolvePath(path: string): string { @@ -195,10 +192,8 @@ var sys: System = (function () { newLine: _os.EOL, useCaseSensitiveFileNames: useCaseSensitiveFileNames, write(s: string): void { - process.stdout.write(s); - }, - writeErr(s: string): void { - process.stderr.write(s); + // 1 is a standard descriptor for stdout + _fs.writeSync(1, s); }, readFile: readFile, writeFile: writeFile,