From d4c554c0b0585904a1dca15fa54882741ef455c5 Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Sun, 29 May 2022 12:32:50 +0800 Subject: [PATCH] tools: fix `license2rtf` exit code is not 0 --- tools/license2rtf.mjs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/license2rtf.mjs b/tools/license2rtf.mjs index 0772b161ed06b1..4cdca33b60995e 100644 --- a/tools/license2rtf.mjs +++ b/tools/license2rtf.mjs @@ -289,11 +289,15 @@ class RtfGenerator extends Stream { stdin.setEncoding('utf-8'); stdin.resume(); -await pipeline( - stdin, - new LineSplitter(), - new ParagraphParser(), - new Unwrapper(), - new RtfGenerator(), - stdout, -); +async function main() { + await pipeline( + stdin, + new LineSplitter(), + new ParagraphParser(), + new Unwrapper(), + new RtfGenerator(), + stdout, + ); +} + +main().catch(console.error);