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

🏗🐛 Change get-zindex to await on child process to close, not the child process's stdout stream #35244

Merged
merged 2 commits into from
Jul 15, 2021
Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions build-system/tasks/get-zindex/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,13 @@ function getZindexChainsInJs(glob, cwd = '.') {

const result = {};

const {stderr, stdout} = jscodeshiftAsync([
const p = jscodeshiftAsync([
danielrozenberg marked this conversation as resolved.
Show resolved Hide resolved
'--dry',
'--no-babel',
`--transform=${__dirname}/jscodeshift/collect-zindex.js`,
...filesIncludingString,
]);
const {stderr, stdout} = p;

stderr.on('data', (data) => {
throw new Error(data.toString());
Expand All @@ -188,7 +189,7 @@ function getZindexChainsInJs(glob, cwd = '.') {
} catch (_) {}
});

stdout.on('close', () => {
p.on('close', () => {
resolve(result);
});
});
Expand Down