From 5f172aedf7917cdefde92b16724d1b22baa67760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Wed, 24 Jul 2024 22:02:36 +0200 Subject: [PATCH] fix(core): remove outdated workaround artificially keeping process alive (#27062) Remove an old workaround added in https://github.com/nrwl/nx/pull/5807. The issue it was addressing was fixed in the Angular CLI shortly after, but the workaround was never removed. ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes # (cherry picked from commit e474b597c5d84d2d01f3dbdb781db04b4f63538d) --- packages/nx/src/command-line/run/run.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/nx/src/command-line/run/run.ts b/packages/nx/src/command-line/run/run.ts index 22db2d3fe70bd..f33b863b53135 100644 --- a/packages/nx/src/command-line/run/run.ts +++ b/packages/nx/src/command-line/run/run.ts @@ -70,19 +70,8 @@ async function* promiseToIterator( async function iteratorToProcessStatusCode( i: AsyncIterableIterator<{ success: boolean }> ): Promise { - // This is a workaround to fix an issue that only happens with - // the @angular-devkit/build-angular:browser builder. Starting - // on version 12.0.1, a SASS compilation implementation was - // introduced making use of workers and it's unref()-ing the worker - // too early, causing the process to exit early in environments - // like CI or when running Docker builds. - const keepProcessAliveInterval = setInterval(() => {}, 1000); - try { - const { success } = await getLastValueFromAsyncIterableIterator(i); - return success ? 0 : 1; - } finally { - clearInterval(keepProcessAliveInterval); - } + const { success } = await getLastValueFromAsyncIterableIterator(i); + return success ? 0 : 1; } async function parseExecutorAndTarget(