You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check: Fix closed-pipe git error that could defeat build_runner suite
Sometimes `tools/check build_runner` would exit with just an error
message about "signal 13":
Running build_runner...
xargs: git: terminated with signal 13; aborting
Running drift...
Signal 13 is SIGPIPE: it means that `git` command under `xargs` was
trying to write to a pipe, presumably its own standard output, and
the other end of the pipe had been closed, presumably by the next
command having already exited.
The reason the other end had been closed is that `grep -q` has an
optimization where it exits as soon as it knows its answer.
Handy in general, but some programs (like `git grep -l`, apparently)
are fragile like this to having their output pipe closed.
So, undo that behavior here.
The overall effect of this bug was that the tools/check script would
report success in this case, but the build_runner suite wouldn't have
run, even if there were relevant input files modified. This didn't
affect runs using `--all-files`, including in CI.
See chat thread:
https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/build_runner.20unexpected.20output/near/1929739
Reported-by: Chris Bobbe <[email protected]>
Fixes: #905
0 commit comments