Skip to content

Commit

Permalink
build: print error code when command fail
Browse files Browse the repository at this point in the history
  • Loading branch information
F3n67u committed May 29, 2022
1 parent 7680752 commit 1376a8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
20 changes: 8 additions & 12 deletions tools/license2rtf.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,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);
pipeline(
stdin,
new LineSplitter(),
new ParagraphParser(),
new Unwrapper(),
new RtfGenerator(),
stdout,
);
6 changes: 3 additions & 3 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1376a8b

Please sign in to comment.