From a6710dcfa08be251b0c20cb5c88cf77acdea5dba Mon Sep 17 00:00:00 2001 From: Dan Muller Date: Mon, 2 Nov 2020 16:04:02 +0000 Subject: [PATCH] fix: log on standalone failures --- .../typescript/internal/worker/worker_adapter.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/typescript/internal/worker/worker_adapter.js b/packages/typescript/internal/worker/worker_adapter.js index 88a95fe90d..5755bd5f48 100644 --- a/packages/typescript/internal/worker/worker_adapter.js +++ b/packages/typescript/internal/worker/worker_adapter.js @@ -61,7 +61,17 @@ async function main() { `Started a new process to perform this action. Your build might be misconfigured, try --strategy=${MNEMONIC}=worker`); - child.on('exit', code => process.exit(code)); + child.on('exit', code => { + if (code !== 0) { + console.error( + `\nStdout from tsc worker:\n\n ${child.stdout.toString().replace(/\n/g, '\n ')}`, + ) + console.error( + `\nStderr from tsc worker:\n\n ${child.stderr.toString().replace(/\n/g, '\n ')}`, + ) + } + process.exit(code) + }); } }