@samitouri / QOS-React-2 / commits / 4df10c5871

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

Brian Vaughn committed Aug 22, 2021 at 16:53 UTC 4df10c58716a0118d753ac314dcb88f06b6d5a3d
1 file changed +9 -1
scripts/merge-fork/replace-fork.js
+9 -1
@@ -22,7 +22,15 @@ async function main() {
22 await Promise.all(oldFilenames.map(unforkFile));
23
24 // Use ESLint to autofix imports
25 - spawnSync('yarn', ['linc', '--fix']);
25 + const spawn = spawnSync('yarn', ['linc', '--fix'], {
26 + stdio: ['inherit', 'inherit', 'pipe'],
27 + });
28 + if (spawn.stderr.toString() !== '') {
29 + spawnSync('git', ['checkout', '.']);
30 +
31 + console.log(Error(spawn.stderr));
32 + process.exitCode = 1;
33 + }
34 }
35
36 async function unforkFile(oldFilename) {