Skip to content

Commit

Permalink
fix(core): remove outdated workaround artificially keeping process alive
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Jul 24, 2024
1 parent 684d2a9 commit 52bb76a
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions packages/nx/src/command-line/run/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,8 @@ async function* promiseToIterator<T extends { success: boolean }>(
async function iteratorToProcessStatusCode(
i: AsyncIterableIterator<{ success: boolean }>
): Promise<number> {
// 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(
Expand Down

0 comments on commit 52bb76a

Please sign in to comment.