Skip to content

Commit

Permalink
Yarn replace-fork should not silently error (facebook#22156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn authored and zhengjitf committed Apr 15, 2022
1 parent e007e6a commit b8fe8c2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/merge-fork/replace-fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b8fe8c2

Please sign in to comment.