chore(tools): Fix stdout buffer of launched process getting full causing tools/lint.js to hang on Windows (#10888)

Also fix Windows only clippy issues.
This commit is contained in:
David Sherret 2021-06-07 22:29:47 -04:00 committed by GitHub
parent 8e96961f0e
commit 6ee983b127
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -17,12 +17,12 @@ async function getFilesFromGit(baseDir, cmd) {
cmd,
stdout: "piped",
});
const output = new TextDecoder().decode(await p.output());
const { success } = await p.status();
if (!success) {
throw new Error("gitLsFiles failed");
}
const output = new TextDecoder().decode(await p.output());
p.close();
const files = output.split("\0").filter((line) => line.length > 0).map(