From 663b768780fa74f354bd2353570c5c0792ca17e7 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 14 Apr 2020 15:40:55 +0100 Subject: [PATCH] fix(ngcc): force ngcc to exit on error (#36622) For some reason (possibly related to async/await promises) the ngcc process is not exiting when spawned from the CLI when there has been an error (such as when it timesout waiting for a lockfile to become free). Calling `process.exit()` directly fixes this. Fixes #36616 PR Close #36622 --- packages/compiler-cli/ngcc/main-ngcc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/ngcc/main-ngcc.ts b/packages/compiler-cli/ngcc/main-ngcc.ts index 770a0b79a7..ca5030e5a2 100644 --- a/packages/compiler-cli/ngcc/main-ngcc.ts +++ b/packages/compiler-cli/ngcc/main-ngcc.ts @@ -153,7 +153,7 @@ if (require.main === module) { process.exitCode = 0; } catch (e) { console.error(e.stack || e.message); - process.exitCode = 1; + process.exit(1); } })(); }