Skip to content

Commit

Permalink
fix(core): remove outdated workaround artificially keeping process al…
Browse files Browse the repository at this point in the history
…ive (#27062)

Remove an old workaround added in #5807.
The issue it was addressing was fixed in the Angular CLI shortly after,
but the workaround was never removed.

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit e474b59)
  • Loading branch information
leosvelperez authored and FrozenPandaz committed Jul 24, 2024
1 parent e457e09 commit 5f172ae
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 5f172ae

Please sign in to comment.