diff --git a/tools/license2rtf.mjs b/tools/license2rtf.mjs index 4cdca33b60995e..d982e679c3e653 100644 --- a/tools/license2rtf.mjs +++ b/tools/license2rtf.mjs @@ -27,6 +27,7 @@ class LineSplitter extends Stream { if (this.buffer) { this.emit('data', this.buffer); } + this.writable = false; this.emit('end'); } } @@ -52,6 +53,7 @@ class ParagraphParser extends Stream { if (data) this.parseLine(data + ''); this.flushParagraph(); + this.writable = false; this.emit('end'); } @@ -211,6 +213,7 @@ class Unwrapper extends Stream { end(data) { if (data) this.write(data); + this.writable = false; this.emit('end'); } } @@ -272,6 +275,7 @@ class RtfGenerator extends Stream { this.write(data); if (this.didWriteAnything) this.emitFooter(); + this.writable = false; this.emit('end'); } @@ -289,15 +293,11 @@ class RtfGenerator extends Stream { stdin.setEncoding('utf-8'); stdin.resume(); -async function main() { - await pipeline( - stdin, - new LineSplitter(), - new ParagraphParser(), - new Unwrapper(), - new RtfGenerator(), - stdout, - ); -} - -main().catch(console.error); +await pipeline( + stdin, + new LineSplitter(), + new ParagraphParser(), + new Unwrapper(), + new RtfGenerator(), + stdout, +); diff --git a/vcbuild.bat b/vcbuild.bat index f0fca0ad7136ae..a6a902a55896f7 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -399,7 +399,7 @@ if errorlevel 1 echo "Could not create junction to 'out\%config%'." & exit /B if not defined sign goto licensertf call tools\sign.bat Release\node.exe -if errorlevel 1 echo Failed to sign exe&goto exit +if errorlevel 1 echo Failed to sign exe, got error code %errorlevel%&goto exit :licensertf @rem Skip license.rtf generation if not requested. @@ -425,7 +425,7 @@ if "%use_x64_node_exe%"=="true" ( %node_exe% tools\license2rtf.mjs < LICENSE > %config%\license.rtf ) -if errorlevel 1 echo Failed to generate license.rtf&goto exit +if errorlevel 1 echo Failed to generate license.rtf, got error code %errorlevel%&goto exit :stage_package if not defined stage_package goto install-doctools @@ -525,7 +525,7 @@ if errorlevel 1 goto exit if not defined sign goto upload call tools\sign.bat node-v%FULLVERSION%-%target_arch%.msi -if errorlevel 1 echo Failed to sign msi&goto exit +if errorlevel 1 echo Failed to sign msi, got error code %errorlevel%&goto exit :upload @rem Skip upload if not requested