Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): remove outdated workaround artificially keeping process alive #27062

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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