Yarn replace-fork should not silently error (#22156)

This commit is contained in:
Brian Vaughn 2021-08-22 16:53:07 -04:00 committed by GitHub
parent fc3b6a4118
commit 4df10c5871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -22,7 +22,15 @@ async function main() {
await Promise.all(oldFilenames.map(unforkFile));
// Use ESLint to autofix imports
spawnSync('yarn', ['linc', '--fix']);
const spawn = spawnSync('yarn', ['linc', '--fix'], {
stdio: ['inherit', 'inherit', 'pipe'],
});
if (spawn.stderr.toString() !== '') {
spawnSync('git', ['checkout', '.']);
console.log(Error(spawn.stderr));
process.exitCode = 1;
}
}
async function unforkFile(oldFilename) {